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

            var actual = sut.Equals(sut);

            Assert.IsTrue(actual);
        }
예제 #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);
        }
예제 #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);
        }
예제 #4
0
파일: Leg.cs 프로젝트: dmitribodiu/Epic.NET
 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));
 }