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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }