public void Equals_ForSameReference_ReturnsTrue() { var sut = new VoyageNumber("9aA9iDDU2"); var actual = sut.Equals(sut); Assert.IsTrue(actual); }
public void Equals_ForSameValue_ReturnsTrue() { var sut1 = new VoyageNumber("9aA9iDDU2"); var sut2 = new VoyageNumber("9aA9iDDU2"); var actual = sut1.Equals(sut2); Assert.IsTrue(actual); }
public void Equals_ForDifferentValue_ReturnsFalse() { var sut1 = new VoyageNumber("9aA9iDDU2"); var sut2 = new VoyageNumber("U982aJnNd"); var actual = sut1.Equals(sut2); Assert.IsFalse(actual); }
public bool Equals(ILeg other) { if (null == other) { return(false); } if (object.ReferenceEquals(this, other)) { return(true); } return(_voyage.Equals(other.Voyage) && _loadLocation.Equals(other.LoadLocation) && _unloadLocation.Equals(other.UnloadLocation) && _loadTime.Equals(other.LoadTime) && _unloadTime.Equals(other.UnloadTime)); }