Beispiel #1
0
        public void EntityWithoutKeyEquals_EntitiesWithSameKeyButDifferentValue_ShouldReturnTrue()
        {
            EntityWithoutKeyMock entity1 = new EntityWithoutKeyMock("key", "prefix", 10);
            EntityWithoutKeyMock entity2 = new EntityWithoutKeyMock("key", "prefix", 15);
            bool actual = entity1.Equals(entity2);

            Assert.True(actual);
        }
Beispiel #2
0
        public void EntityWithoutKeyEquals_EntitiesWithSameValueButDifferentKey_ShouldReturnFalse()
        {
            EntityWithoutKeyMock entity1 = new EntityWithoutKeyMock("key", "prefix", 10);
            EntityWithoutKeyMock entity2 = new EntityWithoutKeyMock("key2", "prefix", 10);
            bool actual = entity1.Equals(entity2);

            Assert.False(actual);
        }