nerdexam
Salesforce

CRT-450 · Question #235

A developer created this Apex trigger that calls Myclass.myStaticMethod: The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall…

The correct answer is D. The deployment fails because the Apex trigger has no code coverage. See the full explanation below for the reasoning.

Question

A developer created this Apex trigger that calls Myclass.myStaticMethod:

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

Options

  • AThe deployment passes because both classes and the trigger were included in the deployment.
  • BThe deployment fails because no assertions were made in the test method.
  • CThe deployment passes because the Apex code has the required >75% code coverage.
  • DThe deployment fails because the Apex trigger has no code coverage.

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    3% (1)
  • C
    13% (4)
  • D
    77% (23)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice