KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > util > typevalidator > test > RequiredTypeValidatorTest


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.util.typevalidator.test;
8
9
10 import junit.framework.TestCase;
11
12 import com.inversoft.util.typevalidator.RequiredTypeValidator;
13
14
15 /**
16  * <p>
17  * This class is the test case for the required type validator.
18  * </p>
19  *
20  * @author Brian Pontarelli
21  */

22 public class RequiredTypeValidatorTest extends TestCase {
23
24     /**
25      * Constructs a new <code>RequiredTypeValidatorTest</code>
26      *
27      * @param name The name of the test currently being run
28      */

29     public RequiredTypeValidatorTest(String JavaDoc name) {
30         super(name);
31     }
32
33
34     /**
35      * Tests the required type validator works.
36      */

37     public void testRequired() {
38         RequiredTypeValidator rtv = new RequiredTypeValidator();
39         assertNull(rtv.validate("value", null, null, null));
40         assertNotNull(rtv.validate(null, null, null, null));
41         assertNotNull(rtv.validate("", null, null, null));
42     }
43 }
Popular Tags