You need to sign in to do that
Don't have an account?
chandra225
about debugging of apex code?
what is the syntax of positive behaviour and negative behaviour? where it is used? what the impact in apex language?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
what is the syntax of positive behaviour and negative behaviour? where it is used? what the impact in apex language?
Are you referring to testing these behaviours rather than debugging? If so, positive behaviour means that when the correct data is input, your apex code behaves as expected (i.e. that triggers update appropriate fields, visualforce controllers insert records etc). Negative behaviour is around ensuring that when the code does not receive correct data, it is handled in a graceful fashion. For example, if a field that the trigger/visualforce relies on is null, this is detected and communicated to the user rather than simply sending them to an error page with a stacktrace.
Just to add to what Bob_Buzzard said, Apex has Try/Catch syntax for gracefully handling negative behavior. It also has Unit Test support for testing both positive and negative outcomes via system.assert() functions.
Hi,
I believe there is no specifice syntaxes for positive and negative behaviour, the way you passes the data to the fields will decide whethere it is positive or negavite behaviour, but try to use try catch block to avoid any unexpected errors.