Beispiel #1
0
 public void Test_DocDirectField_1()
 {
     using (var app = new AzosApplication(null, BASE_CONF))
     {
         var doc = new DocDirectField();
         Aver.IsNull(doc.Validate(app));
     }
 }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
        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);
            }
        }