예제 #1
0
        public void BrokenRuleNotNullAndIsAdded()
        {
            //Preparation
            MockTestEntity testEntityOne = new MockTestEntity();

            //Action
            IEnumerable <BusinessRule> result = testEntityOne.GetBrokenRules();

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual("TestProp", result.First().Property);
            Assert.AreEqual("For Tests Causes", result.First().Rule);
        }
        public void BrokenRuleNotNullAndIsAdded()
        {
            //Preparation
            MockTestEntity testEntityOne = new MockTestEntity();

            //Action
            IEnumerable<BusinessRule> result = testEntityOne.GetBrokenRules();

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual("TestProp", result.First().Property);
            Assert.AreEqual("For Tests Causes", result.First().Rule);
        }
        public void IsNotEqualsEntities()
        {
            //Preparation
            MockTestEntity testEntityOne = new MockTestEntity();
            MockTestEntity testEntityTwo = new MockTestEntity();
            testEntityOne.Id = 6;
            testEntityTwo.Id = 4;

            //Action
            bool result = testEntityOne.Equals(testEntityTwo);

            //Assert
            Assert.IsFalse(result);
            Assert.IsTrue(testEntityOne != testEntityTwo);
        }
예제 #4
0
        public void IsNotEqualsEntities()
        {
            //Preparation
            MockTestEntity testEntityOne = new MockTestEntity();
            MockTestEntity testEntityTwo = new MockTestEntity();

            testEntityOne.Id = 6;
            testEntityTwo.Id = 4;

            //Action
            bool result = testEntityOne.Equals(testEntityTwo);

            //Assert
            Assert.IsFalse(result);
            Assert.IsTrue(testEntityOne != testEntityTwo);
        }