예제 #1
0
        public void NotEqual_Different_Ids()
        {
            TestKeyIdentity left  = new TestKeyIdentity(Guid.NewGuid());
            TestKeyIdentity right = new TestKeyIdentity(Guid.NewGuid());

            Assert_NotEqual(left, right);
        }
예제 #2
0
        public void Equal_Same_Ids()
        {
            Guid            newGuid = Guid.NewGuid();
            TestKeyIdentity left    = new TestKeyIdentity(newGuid);
            TestKeyIdentity right   = new TestKeyIdentity(newGuid);

            Assert_Equal(left, right);
        }
예제 #3
0
        public void NotEqual_CompareWithNull()
        {
            TestKeyIdentity left = new TestKeyIdentity(Guid.NewGuid());

            Assert_NotEqual(left, null);
        }
예제 #4
0
        public void NotEqual_Different_Type()
        {
            TestKeyIdentity left = new TestKeyIdentity(Guid.NewGuid());

            Assert.False(left.Equals(new object()));
        }
예제 #5
0
        public void Equal_Self()
        {
            TestKeyIdentity left = new TestKeyIdentity(Guid.NewGuid());

            Assert_Equal(left, left);
        }
예제 #6
0
        public void ToString_Is_Guid()
        {
            TestKeyIdentity left = new TestKeyIdentity(Guid.NewGuid());

            Assert.Equal(left.Id.ToString(), left.ToString());
        }