public void Test_DocDirectField_1() { using (var app = new AzosApplication(null, BASE_CONF)) { var doc = new DocDirectField(); Aver.IsNull(doc.Validate(app)); } }
public void Test_DocDirectField_2() { using (var app = new AzosApplication(null, BASE_CONF)) { var doc = new DocDirectField(); doc.S1 = "a"; var ve = doc.Validate(app); Aver.IsNotNull(ve); if (ve is FieldValidationException fve) { Console.WriteLine(fve.Message); Aver.IsTrue(fve.Message.Contains("list")); } else { Aver.Fail("Not a FVExcp"); } doc.S1 = "key"; ve = doc.Validate(app); Aver.IsNull(ve); } }
public void Test_DocDirectField_2() { using (var app = new AzosApplication(null, BASE_CONF)) { var doc = new DocDirectField(); doc.S1 = "a"; var ve = doc.Validate(app); Aver.IsNotNull(ve); if (ve is FieldValidationException fve) { fve.Message.See(); Aver.IsTrue(fve.Message.Contains("list")); } else { Aver.Fail(Constants.ERR_NOT_FVEXCP); } doc.S1 = "key"; ve = doc.Validate(app); Aver.IsNull(ve); } }