Qus:    What are the assert statements? What is the purpose?
Oct 11, 2021 02:16 1 Answers Views: 9 DILEEP
Prev Next
Answers (1)
SHIVA Oct 12, 2021 00:00
Answer:   To compare Actual value and Expected value we use assert statements.
Types of assert statements
System.assertEquals(val1,val2): If both val1 and val2 are same then test class run successfully otherwise test class will fail.
System.assertNotEquals(val1,val2): If both val1 and val2 are same then test class run successfully otherwise test class will fail.
System.assertEquals(val1>val2): If the condition satisfied then test class run successfully otherwise test class will fail.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect