Esempio n. 1
0
        public void RubberStamp_Conditions_NotEqualCondition_SetMessage_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, string>(p => p.Name, "TEST")
                            .SetMessage("Error message");

            Assert.AreEqual("Error message", condition.Message);
        }
Esempio n. 2
0
        public void RubberStamp_Conditions_NotEqualCondition_String_Equal_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, string>(p => p.Name, "cde");

            Assert.IsFalse(condition.IsValid(new TestClass {
                Name = "cde"
            }));
        }
Esempio n. 3
0
        public void RubberStamp_Conditions_NotEqualCondition_Int_Lower_Invalid_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, int>(p => p.Index, 3);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Index = 2
            }));
        }
Esempio n. 4
0
        public void RubberStamp_Conditions_NotEqualCondition_Int_Equal_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, int>(p => p.Index, 3);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Index = 3
            }));
        }
Esempio n. 5
0
        public void RubberStamp_Conditions_NotEqualCondition_String_Message_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, string>(p => p.Name, "TEST");

            Assert.AreEqual("The Property Name has to be unequal to TEST", condition.Message);
        }
Esempio n. 6
0
        public void RubberStamp_Conditions_NotEqualCondition_Int_Message_Test()
        {
            var condition = new IsNotEqualCondition <TestClass, int>(p => p.Index, 3);

            Assert.AreEqual("The Property Index has to be unequal to 3", condition.Message);
        }