예제 #1
0
 public void TestValidateBadFormat()
 {
     Assembly assembly = Assembly.GetAssembly((new AdifField()).GetType());
     Stream str = assembly.GetManifestResourceStream("hamqsler.AdifEnumerations.xml");
     AdifEnumerations aEnums = new AdifEnumerations(str);
     Iota iota = new Iota("BA0001", aEnums);
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(iota.Validate(out err, out modStr));
     Assert.AreEqual("\t'BA0001' is not a valid IOTA designator.", err);
     Assert.IsNull(modStr);
 }
예제 #2
0
 public void TestValidateValidDesignator()
 {
     Assembly assembly = Assembly.GetAssembly((new AdifField()).GetType());
     Stream str = assembly.GetManifestResourceStream("hamqsler.AdifEnumerations.xml");
     AdifEnumerations aEnums = new AdifEnumerations(str);
     Iota iota = new Iota("NA-001", aEnums);
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(iota.Validate(out err,out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }