Exemple #1
0
 public void TestIsInEnumerationTrue()
 {
     string err = string.Empty;
     Assembly assembly = Assembly.GetAssembly((new AdifField()).GetType());
     Stream str = assembly.GetManifestResourceStream("hamqsler.AdifEnumerations.xml");
     AdifEnumerations aEnums = new AdifEnumerations(str);
     Submode sm = new Submode("ROS-EME", aEnums);
     Assert.IsTrue(sm.IsInEnumeration(out err));
     Assert.AreEqual(null, err);
 }
Exemple #2
0
 public void TestIsInEnumerationFalse()
 {
     string err = string.Empty;
     Assembly assembly = Assembly.GetAssembly((new AdifField()).GetType());
     Stream str = assembly.GetManifestResourceStream("hamqsler.AdifEnumerations.xml");
     AdifEnumerations aEnums = new AdifEnumerations(str);
     Submode sm = new Submode("e6", aEnums);
     Assert.IsFalse(sm.IsInEnumeration(out err));
     Assert.AreEqual("\tThis QSO Field is of type enumeration. The value 'e6' " +
                         "was not found in enumeration.", err);
 }