01: package experiments;
02:
03: import junit.framework.Test;
04: import junit.framework.TestCase;
05: import junit.framework.TestSuite;
06:
07: /**
08: * Tests the JumblerExperiment class (inadequately) for
09: * com.reeltwo.jumble testing.
10: * @author Tin Pavlinic
11: * @version $Revision: 496 $
12: */
13: public class JumblerExperimentTest extends TestCase {
14: private JumblerExperiment mExp = new JumblerExperiment();
15:
16: public void testAdd() {
17: assertEquals(3, mExp.add(2, 1));
18: //assertEquals(-1, mExp.add(1,2));
19: }
20:
21: public void testMultiply() {
22: assertEquals(4, mExp.multiply(2, 2));
23: }
24:
25: public static Test suite() {
26: TestSuite suite = new TestSuite(JumblerExperimentTest.class);
27: return suite;
28: }
29:
30: public static void main(String[] args) {
31: junit.textui.TestRunner.run(suite());
32: }
33: }
|