Show List

Quiz - JUnit - 4

54%

Public Average Score
Select the right answer for below questions:

What is the use of JUnit assertFalse method?
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To assert that a statement is false in a test case
To assert that a statement is false in a test case

What is the use of JUnit assertNotNull method?
To assert that an object is not null in a test case
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To assert that an object is not null in a test case

What is the use of JUnit assertNull method?
To handle exceptions in a test case
To assert that an object is null in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To assert that an object is null in a test case

What is the use of JUnit assertNotSame method?
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To assert that two objects are not the same in a test case
To compare the expected result with the actual result of a test case
To assert that two objects are not the same in a test case

What is the use of JUnit assertSame method?
To assert that two objects are the same in a test case
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To assert that two objects are the same in a test case

What is the use of JUnit @Before annotation?
To mark a method to be run before each test case
To mark a method to be run after each test case
To mark a method to be run only once before all test cases
To mark a method to be run only once after all test cases
To mark a method to be run before each test case

What is the use of JUnit @After annotation?
To mark a method to be run before each test case
To mark a method to be run after each test case
To mark a method to be run only once before all test cases
To mark a method to be run only once after all test cases
To mark a method to be run after each test case

What is the use of JUnit @BeforeClass annotation?
To mark a method to be run before each test case
To mark a method to be run after each test case
To mark a method to be run only once before all test cases
To mark a method to be run only once after all test cases
To mark a method to be run only once before all test cases

What is the use of JUnit @AfterClass annotation?
To mark a method to be run before each test case
To mark a method to be run after each test case
To mark a method to be run only once before all test cases
To mark a method to be run only once after all test cases
To mark a method to be run only once after all test cases

What is the use of JUnit @Ignore annotation?
To ignore a test case
To handle exceptions in a test case
To set up and clean up test data before and after each test case execution
To compare the expected result with the actual result of a test case
To ignore a test case

Submit
Retry
{"qz1-410773":"To assert that a statement is false in a test case","qz1-410774":"To assert that an object is not null in a test case","qz1-410775":"To assert that an object is null in a test case","qz1-410776":"To assert that two objects are not the same in a test case","qz1-410777":"To assert that two objects are the same in a test case","qz1-410778":"To mark a method to be run before each test case","qz1-410779":"To mark a method to be run after each test case","qz1-410780":"To mark a method to be run only once before all test cases","qz1-410781":"To mark a method to be run only once after all test cases","qz1-410782":"To ignore a test case"}

    Leave a Comment


  • captcha text