예제 #1
0
        public void should_get_unequal_when_compare_two_lengths_with_same_unit_and_different_length_number()
        {
            var lengthA = new Length(2, Unit.Meter);
            var lengthB = new Length(1, Unit.Meter);

            Assert.False(lengthA.Equals(lengthB));
        }
예제 #2
0
        public void should_get_equal_when_compare_one_meter_length_with_one_thousand_millimeter_length()
        {
            var lengthA = new Length(1, Unit.Meter);
            var lengthB = new Length(1000, Unit.MilliMeter);

            Assert.True(lengthA.Equals(lengthB));
        }
예제 #3
0
 public void should_get_unequal_when_compare_one_centimeter_length_with_one_hundred_millimeter_length()
 {
     var lengthA = new Length(1, Unit.CentiMeter);
     var lengthB = new Length(100, Unit.MilliMeter);
     Assert.False(lengthA.Equals(lengthB));
 }