Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
student:junit:v3 [2018/08/14 13:27] – created bernstdhstudent:junit:v3 [2018/08/14 13:32] bernstdh
Line 25: Line 25:
 and must include a class declaration of the following form: and must include a class declaration of the following form:
      
-  public class //ClassName//Test extends TestCase    |+ 
 + public class //ClassName//Test extends TestCase  |
  
 So, continuing with the example above, ''%%AtomTest.java%%''   would initially contain the following: So, continuing with the example above, ''%%AtomTest.java%%''   would initially contain the following:
Line 73: Line 74:
 |   Assert.assertEquals(//Description//, //ExpectedValue//, //ActualValue//);    | |   Assert.assertEquals(//Description//, //ExpectedValue//, //ActualValue//);    |
    
 +|  Assert.assertEquals(//Description//, //ExpectedValue//, //ActualValue//);  |
 +
 The //Description// is a human-readable ''%%String%%''   that provides information that enables the tester to understand the   test in the event that the code fails the test.   The //ExpectedValue// contains   the correct value (i.e., the value that the tester expects if the   method named //MethodName// in //ClassName// is working   correctly.  The //ActualValue// contains the value that was   actually generated by the method named //MethodName// in   //ClassName//. The //Description// is a human-readable ''%%String%%''   that provides information that enables the tester to understand the   test in the event that the code fails the test.   The //ExpectedValue// contains   the correct value (i.e., the value that the tester expects if the   method named //MethodName// in //ClassName// is working   correctly.  The //ActualValue// contains the value that was   actually generated by the method named //MethodName// in   //ClassName//.