Exemplo n.º 1
0
        public void EqualsMatchesTwoNames()
        {
            // Arrange
            DocumentHandle nameHandle1 = new DocumentHandle("test");
            DocumentHandle nameHandle2 = new DocumentHandle("test");

            // Assert
            Assert.IsTrue(nameHandle1.Equals(nameHandle2), "Should be equal");
        }
Exemplo n.º 2
0
        public void EqualsDoesNotMatchTwoDifferentNames()
        {
            // Arrange
            DocumentHandle nameHandle1 = new DocumentHandle("test1");
            DocumentHandle nameHandle2 = new DocumentHandle("test2");

            // Assert
            Assert.IsFalse(nameHandle1.Equals(nameHandle2), "Should not be equal");
        }
Exemplo n.º 3
0
        public void EqualsDoesNotMatchTwoDifferentGuids()
        {
            // Arrange
            DocumentHandle guidHandle1 = new DocumentHandle(Guid.NewGuid());
            DocumentHandle guidHandle2 = new DocumentHandle(Guid.NewGuid());

            // Assert
            Assert.IsFalse(guidHandle1.Equals(guidHandle2), "Should not be equal");
        }
Exemplo n.º 4
0
        public void EqualsMatchesTwoGuids()
        {
            // Arrange
            Guid           guid        = Guid.NewGuid();
            DocumentHandle guidHandle1 = new DocumentHandle(guid);
            DocumentHandle guidHandle2 = new DocumentHandle(guid);

            // Assert
            Assert.IsTrue(guidHandle1.Equals(guidHandle2), "Should be equal");
        }
Exemplo n.º 5
0
        public void EqualsDoesNotMatchNull()
        {
            // Arrange
            DocumentHandle guidHandle = new DocumentHandle(Guid.NewGuid());
            DocumentHandle nameHandle = new DocumentHandle("test");

            // Assert
            Assert.IsFalse(guidHandle.Equals(null), "Should not be equal");
            Assert.IsFalse(nameHandle.Equals(null), "Should not be equal");
        }
Exemplo n.º 6
0
        public void GuidHandleNotEqualToNameHandle()
        {
            // Act
            DocumentHandle guidHandle = new DocumentHandle(Guid.NewGuid());
            DocumentHandle nameHandle = new DocumentHandle("test");

            // Assert
            Assert.IsFalse(guidHandle.Equals(nameHandle), "Should be considered different");
            Assert.IsFalse(nameHandle.Equals(guidHandle), "Should be considered different");
        }