KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > a > a1 > AUTest


1 package a.a1;
2
3 import junit.framework.Test;
4 import junit.framework.TestCase;
5 import junit.framework.TestSuite;
6
7 /**
8  * Simple tests for the A class.
9  *
10  * @author Matt Albrecht <a HREF="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
11  * @version $Date: 2004/04/20 23:40:18 $
12  * @since December 2, 2003
13  */

14 public class AUTest extends TestCase
15 {
16     private static final Class JavaDoc THIS_CLASS = AUTest.class;
17     
18     public AUTest( String JavaDoc name )
19     {
20         super( name );
21     }
22
23
24     //-------------------------------------------------------------------------
25
// Tests
26

27     public void testGetNext()
28     {
29         A a = new A();
30         assertEquals( 1, a.getNext() );
31         assertEquals( 2, a.getNext() );
32         assertEquals( 3, a.getNext() );
33     }
34     
35     
36     //-------------------------------------------------------------------------
37
// Standard JUnit declarations
38

39     
40     public static Test suite()
41     {
42         TestSuite suite = new TestSuite( THIS_CLASS );
43         
44         return suite;
45     }
46 }
47
48
Popular Tags