Exemplo n.º 1
0
 public void TestValidateFalse1()
 {
     string err = string.Empty;
     string modStr = string.Empty;
     EnumerationValue ef = new EnumerationValue("ABCD", "Arrl_Section", aEnums);
     Assert.IsFalse(ef.Validate(out err, out modStr));
     Assert.AreEqual("\tThis QSO Field is of type enumeration. The value 'ABCD' was not found in enumeration.",
                     err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 2
0
 public void TestValidateFalse()
 {
     string[] enums = {"e1", "e2", "e3", "e4"};
     EnumerationValue eVal = new EnumerationValue("e5", enums);
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(eVal.Validate(out err, out modStr));
     Assert.AreEqual("\tThis QSO Field is of type enumeration. The value 'e5' was not found in enumeration.",
                     err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 3
0
 public void TestValidateNullValue()
 {
     string err = string.Empty;
     string modStr = string.Empty;
     EnumerationValue ef = new EnumerationValue(null, "Arrl_Section", aEnums);
     Assert.IsFalse(ef.Validate(out err, out modStr));
     Assert.AreEqual("Value is null.", err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 4
0
 public void TestValidateTrue1()
 {
     string err = string.Empty;
     string modStr = string.Empty;
     EnumerationValue ef = new EnumerationValue("NT", "Arrl_Section", aEnums);
     Assert.IsTrue(ef.Validate(out err, out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }
Exemplo n.º 5
0
 public void TestValidateTrue()
 {
     string[] enums = {"e1", "e2", "e3", "e4"};
     EnumerationValue eVal = new EnumerationValue("e1", enums);
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(eVal.Validate(out err, out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }