Exemple #1
0
        public void DifferentTypesOfIdentitiesAreNotEqual()
        {
            // Arrange
            LongAId id1 = new LongAId(1);
            LongBId id2 = new LongBId(1);

            // Assert
            Assert.IsFalse(id1 == id2);
            Assert.IsTrue(id1 != id2);
        }
Exemple #2
0
        public void ItIncludesPrefixInLiteral()
        {
            // Arrange
            LongAId id1 = new LongAId(3);
            LongBId id2 = new LongBId(4);

            // Assert
            Assert.AreEqual("A3", id1.Literal);
            Assert.AreEqual("B4", id2.Literal);
        }
Exemple #3
0
        public void CanCompareIdentities()
        {
            // Arrange
            LongAId id1 = new LongAId(1);
            LongAId id2 = new LongAId(1);
            LongAId id3 = new LongAId(2);

            // Assert
            Assert.IsTrue(id1 == id2);
            Assert.IsFalse(id1 != id2);
            Assert.IsFalse(id1 == id3);
        }