Esempio n. 1
0
        public void EntityWithKeyEquals_EntitiesWithSameValueButDifferentKey_ShouldReturnFalse()
        {
            EntityWithKeyMock entity1 = new EntityWithKeyMock(Guid.NewGuid(), "value");
            EntityWithKeyMock entity2 = new EntityWithKeyMock(Guid.NewGuid(), "value");
            bool actual = entity1.Equals(entity2);

            Assert.False(actual);
        }
Esempio n. 2
0
        public void EntityWithKeyEquals_EntitiesWithSameKeyButDifferentValue_ShouldReturnTrue()
        {
            Guid guid = Guid.NewGuid();
            EntityWithKeyMock entity1 = new EntityWithKeyMock(guid, "value");
            EntityWithKeyMock entity2 = new EntityWithKeyMock(guid, "value 2");
            bool actual = entity1.Equals(entity2);

            Assert.True(actual);
        }