public void EqualsMatchesTwoNames() { // Arrange DocumentHandle nameHandle1 = new DocumentHandle("test"); DocumentHandle nameHandle2 = new DocumentHandle("test"); // Assert Assert.IsTrue(nameHandle1.Equals(nameHandle2), "Should be equal"); }
public void EqualsDoesNotMatchTwoDifferentNames() { // Arrange DocumentHandle nameHandle1 = new DocumentHandle("test1"); DocumentHandle nameHandle2 = new DocumentHandle("test2"); // Assert Assert.IsFalse(nameHandle1.Equals(nameHandle2), "Should not be equal"); }
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"); }
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"); }
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"); }
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"); }