Exemplo n.º 1
0
 public void TestValidateInvalidCounty2()
 {
     My_Usaca_Counties ucs = new My_Usaca_Counties("MA,Franklin:MASS,Hampshire");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(ucs.Validate(out err, out modStr));
     Assert.AreEqual("\t'MASS,Hampshire' is not in correct county format.", err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 2
0
 public void TestValidateNoCounties()
 {
     My_Usaca_Counties ucs = new My_Usaca_Counties(string.Empty);
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(ucs.Validate(out err, out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 3
0
 public void TestValidateOneCounty()
 {
     My_Usaca_Counties ucs = new My_Usaca_Counties("MA,Franklin");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(ucs.Validate(out err, out modStr));
     Assert.AreEqual("My_Usaca_Counties must contain exactly two counties.", err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 4
0
 public void TestValidateValidCounties()
 {
     My_Usaca_Counties ucs = new My_Usaca_Counties("MA,Franklin:MA,Hampshire");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(ucs.Validate(out err, out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }