Home »
MCQs »
JUnit MCQs
Which of the following checks if the condition is TRUE?
17. Which of the following checks if the condition is TRUE?
- void assertEquals(boolean expected,boolean actual)
- void assertTrue(boolean condition)
- void assertFalse(boolean condition)
- void assertNull(Object obj)
Answer: B) void assertTrue(boolean condition)
Explanation:
void assertTrue(boolean condition) checks if the condition is TRUE.