Which method is used to verify the actual and expected results in Junits?

Which method is used to verify the actual and expected results in Junits?
A. assert()
B. equals()
C. ==
D. isEqual()
 
Answer: a
Explanation: assert method is used to compare actual and expected results in Junit. It has various implementation like assertEquals, assertArrayEquals, assertFalse, assertNotNull, etc.
 

Tìm kiếm

Back
Top