Interview Question
Qus: What are the assert statements? What is the purpose?
Answers (1)
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.