Solved

Consider the Partial JUnit Test Below, Designed to Test a Class

Question 70

Multiple Choice

Consider the partial JUnit test below, designed to test a class that keeps a count:

Consider the partial JUnit test below, designed to test a class that keeps a count:     Which line will test that the resulting value is 12 ? A)  Assert.assertequals (12, ctr.getValue () ) ; B)  Assert.assertEquals(ctr.getValue() ) ; C)  System. out.println (12==ctr.getValue () ) ; D)  if (12==ctr.getValue () )   { System. out.println( Passed ) ; }  else  { System.out.println( Failed ) ; }
Which line will test that the resulting value is 12 ?


A) Assert.assertequals (12, ctr.getValue () ) ;
B) Assert.assertEquals(ctr.getValue() ) ;
C) System. out.println (12==ctr.getValue () ) ;
D) if (12==ctr.getValue () ) { System. out.println("Passed") ; }
else { System.out.println("Failed") ; }

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions