Exemplo n.º 1
0
        protected static void AssertInvalidProperty(BusinessObjectBase o, string property, Type expectedValidatorType)
        {
            Assert.AreEqual(o.GetBrokenRules(property).Count, 1);
            Assert.IsNotNull(o[property]);

            var v = o.GetBrokenRules()[0];
            Assert.AreEqual(property, v.PropertyName);
            Assert.IsNotNull(v.Description);
            Assert.IsInstanceOfType(v, expectedValidatorType);
        }
        protected static void AssertInvalidProperty(BusinessObjectBase o, string property, Type expectedValidatorType)
        {
            Assert.AreEqual(o.GetBrokenRules(property).Count, 1);
            Assert.IsNotNull(o[property]);

            var v = o.GetBrokenRules()[0];

            Assert.AreEqual(property, v.PropertyName);
            Assert.IsNotNull(v.Description);
            Assert.IsInstanceOf(expectedValidatorType, v);
        }
Exemplo n.º 3
0
 protected static void AssertValidProperty(BusinessObjectBase o, string property)
 {
     Assert.AreEqual(o.GetBrokenRules(property).Count, 0);
     Assert.IsNull(o[property]);
 }
Exemplo n.º 4
0
 protected static void AssertValidObject(BusinessObjectBase o)
 {
     Assert.IsTrue(o.IsValid);
     Assert.IsNull(o.Error);
     Assert.AreEqual(o.GetBrokenRules().Count, 0);
 }
Exemplo n.º 5
0
 protected static void AssertInvalidObject(BusinessObjectBase o)
 {
     Assert.IsFalse(o.IsValid);
     Assert.AreEqual(o.GetBrokenRules().Count, 1);
 }
 protected static void AssertInvalidObject(BusinessObjectBase o)
 {
     Assert.IsFalse(o.IsValid);
     Assert.AreEqual(o.GetBrokenRules().Count, 1);
 }
 protected static void AssertValidProperty(BusinessObjectBase o, string property)
 {
     Assert.AreEqual(o.GetBrokenRules(property).Count, 0);
     Assert.IsNull(o[property]);
 }
 protected static void AssertValidObject(BusinessObjectBase o)
 {
     Assert.IsTrue(o.IsValid);
     Assert.IsNull(o.Error);
     Assert.AreEqual(o.GetBrokenRules().Count, 0);
 }