public void ConcurrencyCheckRule_Sets_ErrorMessage_On_Invalid()
 {
     var obj1 = new ConcurrencyMock() { Version = "1" };
     var obj2 = new ConcurrencyMock() { Version = "2" };
     var rule = new ConcurrencyCheckRule(obj1, obj2);
     rule.Validate().ErrorMessage.ShouldNotBeEmpty();
 }
 public void ConcurrencyCheckRule_Returns_False()
 {
     var obj1 = new ConcurrencyMock() { Version = "1" };
     var obj2 = new ConcurrencyMock() { Version = "2" };
     var rule = new ConcurrencyCheckRule(obj1, obj2);
     rule.Validate().IsValid.ShouldBe(false);
 }
Beispiel #3
0
        public void ConcurrencyCheckRule_Returns_False()
        {
            var obj1 = new ConcurrencyMock {
                Version = "1"
            };
            var obj2 = new ConcurrencyMock {
                Version = "2"
            };
            var rule = new ConcurrencyCheckRule(obj1, obj2);

            rule.Validate().IsValid.ShouldBe(false);
        }
Beispiel #4
0
        public void ConcurrencyCheckRule_Sets_ErrorMessage_On_Invalid()
        {
            var obj1 = new ConcurrencyMock {
                Version = "1"
            };
            var obj2 = new ConcurrencyMock {
                Version = "2"
            };
            var rule = new ConcurrencyCheckRule(obj1, obj2);

            rule.Validate().ErrorMessage.ShouldNotBeEmpty();
        }
Beispiel #5
0
        public void ConcurrencyCheckRuleReturnsTrue()
        {
            var obj1 = new ConcurrencyMock()
            {
                Version = "1"
            };
            var obj2 = new ConcurrencyMock()
            {
                Version = "1"
            };
            var rule = new ConcurrencyCheckRule(obj1, obj2);

            rule.Validate().IsValid.ShouldBe(true);
        }