예제 #1
0
        public void NotEqualNameDocumentHandlesHaveDifferentHashCode()
        {
            // Arrange
            DocumentHandle handle1 = new DocumentHandle("test1");
            DocumentHandle handle2 = new DocumentHandle("test2");

            // Assert
            Assert.AreNotEqual <int>(handle1.GetHashCode(), handle2.GetHashCode(), "Should not be equal");
        }
예제 #2
0
        public void EqualNameDocumentHandlesHaveSameHashCode()
        {
            // Arrange
            DocumentHandle handle1 = new DocumentHandle("test");
            DocumentHandle handle2 = new DocumentHandle("test");

            // Assert
            Assert.AreEqual <int>(handle1.GetHashCode(), handle2.GetHashCode(), "Should be equal");
        }
예제 #3
0
        public void NotEqualGuidDocumentHandlesHaveDifferentHashCode()
        {
            // Arrange
            DocumentHandle handle1 = new DocumentHandle(Guid.NewGuid());
            DocumentHandle handle2 = new DocumentHandle(Guid.NewGuid());

            // Assert
            Assert.AreNotEqual <int>(handle1.GetHashCode(), handle2.GetHashCode(), "Should not be equal");
        }
예제 #4
0
        public void EqualGuidDocumentHandlesHaveSameHashCode()
        {
            // Arrange
            Guid           guid    = Guid.NewGuid();
            DocumentHandle handle1 = new DocumentHandle(guid);
            DocumentHandle handle2 = new DocumentHandle(guid);

            // Assert
            Assert.AreEqual <int>(handle1.GetHashCode(), handle2.GetHashCode(), "Should be equal");
        }