Exemple #1
0
        public void TwoSutsWithIdenticalIdAreEqual(Guid guid)
        {
            UuidIri sut   = guid;
            UuidIri other = guid;

            var actual1 = sut.Equals((object)other);
            var actual2 = sut.Equals(other);
            var actual3 = sut == other;
            var actual4 = sut != other;

            Assert.True(actual1, "Equals(object)");
            Assert.True(actual2, "Equals(UuidIri)");
            Assert.True(actual3, "==");
            Assert.False(actual4, "!=");
        }
Exemple #2
0
        public void TwoSutsWithDifferentIdsAreNotEquals(
            Guid x,
            Guid y)
        {
            Assert.NotEqual(x, y);

            UuidIri sut   = x;
            UuidIri other = y;

            var actual1 = sut.Equals((object)other);
            var actual2 = sut.Equals(other);
            var actual3 = sut == other;
            var actual4 = sut != other;

            Assert.False(actual1, "Equals(object)");
            Assert.False(actual2, "Equals(UuidIri)");
            Assert.False(actual3, "==");
            Assert.True(actual4, "!=");
        }