I have a re-parenting trigger that fires if the connectionReceivedId is of a certain value. The sad part is that it looks like that field is not writeable, so testing is not possible. I know I could rewrite the trigger to work around this, but I would enjoy being able to actually sort records needing re-parenting by the connection from which they were received.
Since the last release, when I execute a single unit test (via Develop > Apex Classes > Test Class > Run Test), I get taken to the “Apex Test Execution” screen. This screen shows whether the test passed or failed, but not the line coverage directly attributable to this unit test.
I have a controller that initiates a flow when a button is clicked on a lead. I understand that unit test classes cannot make web callouts, so I have created a class that implements the HttpCalloutMock interface as specified in this documentation. The definition of my controller is as follows:
I am new to writing test classes. Here is the method I have written my test class on
null in my code here, while running a unit test, but in Execute Anonimous Window there is a right value in
System.debug(). What the hell? Maybe I should run the test as
System Administrator? If so, how to do that?
I am developing a Apex REST class for an external system. I have done with the development and everything is working good.
I have a Visualforce page that is using a Controller extension. The extension’s SOQL query is not returning the data that I expect when I run my unit tests, although it works inside of our sandbox. The query returns
Opportunity fields but when I filter on certain
Account fields I end up with 0 rows returned.
I need to create a child event isChild=true with apex. I need it in my test class. any suggestion.
The syntax of invoking the class in a test eludes me still (not so on triggers!).