Пример #1
0
        public void EntitiesAreEqualIfBothNull()
        {
            EntityMock a = null;
            EntityMock b = null;

            bool result = (a == b);

            Assert.IsTrue(result);
        }
Пример #2
0
        public void EntitiesAreEqualIfBothExists()
        {
            var obj1 = new EntityMock();
            var obj2 = obj1;

            bool result = (obj1 == obj2);

            Assert.IsTrue(result);
        }
Пример #3
0
        public void EntitiesAreNotTheSameIfBothAreDifferent()
        {
            EntityMock a = new EntityMock();
            EntityMock b = new EntityMock();

            bool result = (a != b);

            Assert.IsTrue(result);
        }
Пример #4
0
        public void EntitiesAreNotEqualIfSecondObjectIsNull()
        {
            EntityMock a = new EntityMock();
            EntityMock b = null;

            bool result = (a == b);

            Assert.IsFalse(result);
        }
Пример #5
0
        public void EqualsIsTrueIfIDsAreEquals()
        {
            var id   = Guid.NewGuid();
            var obj1 = new EntityMock(id);
            var obj2 = new EntityMock(id);

            var result = obj1.Equals(obj2);

            Assert.IsTrue(result);
        }
Пример #6
0
 public void SetUp()
 {
     entityMock = new EntityMock();
 }