Esempio n. 1
0
        private void TestEqualsWithDifferentKeyId()
        {
            KeyMeta otherKeyMeta = new KeyMeta("some_other_keyid", created);

            Assert.False(keyMeta.Equals(otherKeyMeta));
            Assert.False(otherKeyMeta.Equals(keyMeta));
        }
Esempio n. 2
0
        private void TestEqualsWithDifferentCreated()
        {
            KeyMeta otherKeyMeta = new KeyMeta(KeyId, created.AddMinutes(3));

            Assert.False(keyMeta.Equals(otherKeyMeta));
            Assert.False(otherKeyMeta.Equals(keyMeta));
        }
Esempio n. 3
0
        private void TestHashCodeAndEqualsSymmetric()
        {
            KeyMeta otherKeyMeta = new KeyMeta(KeyId, created);

            Assert.True(keyMeta.GetHashCode() == otherKeyMeta.GetHashCode());
            Assert.NotSame(keyMeta, otherKeyMeta);
            Assert.True(keyMeta.Equals(otherKeyMeta) && otherKeyMeta.Equals(keyMeta));
        }