Example #1
0
        public void Equals_ForSameReference_ReturnsTrue()
        {
            var sut = new VoyageNumber("9aA9iDDU2");

            var actual = sut.Equals(sut);

            Assert.IsTrue(actual);
        }
Example #2
0
        public void Equals_ForSameValue_ReturnsTrue()
        {
            var sut1 = new VoyageNumber("9aA9iDDU2");
            var sut2 = new VoyageNumber("9aA9iDDU2");

            var actual = sut1.Equals(sut2);

            Assert.IsTrue(actual);
        }
Example #3
0
        public void Equals_ForDifferentValue_ReturnsFalse()
        {
            var sut1 = new VoyageNumber("9aA9iDDU2");
            var sut2 = new VoyageNumber("U982aJnNd");

            var actual = sut1.Equals(sut2);

            Assert.IsFalse(actual);
        }
Example #4
0
 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));
 }