KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > a > a2 > BUTest


1 package a.a2;
2
3 import junit.framework.Test;
4 import junit.framework.TestCase;
5 import junit.framework.TestSuite;
6
7 /**
8  * Simple tests for the B 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:21 $
12  * @since December 2, 2003
13  */

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

27     public void testGetNext()
28     {
29         B b = new B();
30         assertEquals( -1, b.getNext() );
31         assertEquals( -2, b.getNext() );
32         assertEquals( -3, b.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