KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > csdl > foo > TestBar2


1 package csdl.foo;
2
3 import junit.framework.TestCase;
4
5 /**
6  * Provides one test case for class Bar.
7  *
8  * @author Joy M. Agustin
9  * @version $Id: TestBar2.java,v 1.2 2003/01/25 01:48:59 jagustin Exp $
10  */

11 public class TestBar2 extends TestCase {
12
13   /**
14    * Required by JUnit.
15    *
16    * @param name Description of the Parameter
17    */

18   public TestBar2(String JavaDoc name) {
19     super(name);
20   }
21
22   /**
23    * Prints out method name to screen, creates an instance of the Bar class, calls
24    * methodB(String, Integer) in Bar, and then performs a meaningless test.
25    *
26    * @throws Exception Description of the Exception
27    */

28   public void testBar2() throws Exception JavaDoc {
29     System.out.println("TestFooBar: testFoo");
30     Bar bar = new Bar();
31     bar.methodB(new String JavaDoc("junk"), new Integer JavaDoc("0"));
32     assertEquals("meaningless test", 2, 2);
33   }
34 }
35
Popular Tags