USStateFieldTest.java
00001 package edu.virtualschool.jwaa.test;
00002
00003 import edu.virtualschool.jwaa.field.USStateField;
00004
00005 public class USStateFieldTest extends junit.framework.TestCase
00006 {
00007 public USStateFieldTest() { super("USStateFieldTest"); }
00008 public USStateFieldTest(String name) { super(name); }
00009
00010 public void testInvalid()
00011 {
00012 String[] ary = new String[] {
00013 "",
00014 "AB",
00015 "ABC",
00016 "70",
00017 "703",
00018 "11",
00019 "*",
00020 };
00021 for (int i = 0; i < ary.length; i++)
00022 {
00023 USStateField p = new USStateField(ary[i]);
00024 assertTrue(p.inspect(), !p.ok());
00025 }
00026 }
00027 public void testValid()
00028 {
00029 String[] ary = USStateField.members;
00030 for (int i = 0; i < ary.length; i++)
00031 {
00032 USStateField p = new USStateField(ary[i]);
00033 assertTrue(ary[i], p.ok);
00034 }
00035 }
00036 }