Ejemplo n.º 1
0
 public void TestValidateInvalidCounty2()
 {
     Usaca_Counties ucs = new 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);
 }
Ejemplo n.º 2
0
 public void TestValidateNoCounties()
 {
     Usaca_Counties ucs = new 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);
 }
Ejemplo n.º 3
0
 public void TestValidateOneCounty()
 {
     Usaca_Counties ucs = new Usaca_Counties("MA,Franklin");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(ucs.Validate(out err, out modStr));
     Assert.AreEqual("Usaca_Counties must contain exactly two counties.", err);
     Assert.IsNull(modStr);
 }
Ejemplo n.º 4
0
 public void TestValidateValidCounties()
 {
     Usaca_Counties ucs = new 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);
 }