KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > uitags > js > SuitesTest


1 package net.sf.uitags.js;
2
3 import junit.framework.TestCase;
4
5 public class SuitesTest extends TestCase {
6   public void testNullSuiteNameGivesAllSuites() {
7     assertTrue(Suites.getInstance(null) instanceof AllSuites);
8   }
9
10   public void testKeywordAllForSuiteNameGivesAllSuites() {
11     assertTrue(Suites.getInstance(Suites.KEYWORD_ALL) instanceof AllSuites);
12   }
13
14   public void testKeywordAllMixedWithOtherWordsCausesException() {
15     try {
16       Suites.getInstance("all,mixed with other words");
17       fail("Should've gotten an exception.");
18     }
19     catch (IllegalArgumentException JavaDoc expected) {
20       // OK - exception expected.
21
}
22   }
23 }
24
Popular Tags