Exemple #1
0
        public void GDID_RequiredRow_1()
        {
            var row = new GDIDRow();
            var err = row.Validate();

            Assert.IsNotNull(err);
            Assert.IsInstanceOf <CRUDFieldValidationException>(err);
            Assert.AreEqual("GDID", ((CRUDFieldValidationException)err).FieldName);

            row.GDID = new GDID(1, 1, 1);
            err      = row.Validate();

            Assert.IsNull(err);
            row.GDID = GDID.Zero;
            err      = row.Validate();

            Assert.IsNotNull(err);
            Assert.IsInstanceOf <CRUDFieldValidationException>(err);
            Assert.AreEqual("GDID", ((CRUDFieldValidationException)err).FieldName);
        }
Exemple #2
0
        public void GDID_RequiredRow_1()
        {
            var row = new GDIDRow();
            var err = row.Validate();

            Aver.IsNotNull(err);
            Aver.IsTrue(err is FieldValidationException);
            Aver.AreEqual("GDID", ((FieldValidationException)err).FieldName);

            row.GDID = new GDID(1, 1, 1);
            err      = row.Validate();

            Aver.IsNull(err);
            row.GDID = GDID.ZERO;
            err      = row.Validate();

            Aver.IsNotNull(err);
            Aver.IsTrue(err is FieldValidationException);
            Aver.AreEqual("GDID", ((FieldValidationException)err).FieldName);
        }
Exemple #3
0
        public void GDID_RequiredRow_1()
        {
            var row = new GDIDRow();
            var err = row.Validate();

            Assert.IsNotNull(err);
            Assert.IsInstanceOf<CRUDFieldValidationException>(err);
            Assert.AreEqual("GDID", ((CRUDFieldValidationException)err).FieldName);

            row.GDID = new GDID(1,1,1);
            err = row.Validate();

            Assert.IsNull(err);
            row.GDID = GDID.Zero;
            err = row.Validate();

            Assert.IsNotNull(err);
            Assert.IsInstanceOf<CRUDFieldValidationException>(err);
            Assert.AreEqual("GDID", ((CRUDFieldValidationException)err).FieldName);
        }