예제 #1
0
 public void should_equal_11_centimeters_given_1_centimeter_and_1_decimeter()
 {
     var oneDM = new Length(1, Unit.Decimeter);
     (oneCM + oneDM).should_be(new Length(11, Unit.Centimeter));
 }
예제 #2
0
 public static void should_not_be(this Length length, Length expectedLength)
 {
     Assert.AreNotEqual(expectedLength, length);
 }
예제 #3
0
 public void Setup()
 {
     oneCM = new Length(1, Unit.Centimeter);
 }
예제 #4
0
 public void should_equal_101_centimeters_given_1_centimeter_and_1_meter()
 {
     var oneM = new Length(1, Unit.Meter);
     (oneCM + oneM).should_be(new Length(101, Unit.Centimeter));
 }
예제 #5
0
 public void should_equal_1_point_1dm_given_1mm_plus_1dm()
 {
     var oneMM = new Length(1, Unit.Millimeter);
     var oneDM = new Length(1, Unit.Decimeter);
     (oneMM + oneDM).should_be(new Length(1.01, Unit.Decimeter));
 }
예제 #6
0
 public void should_equal_2mm_given_1mm_plus_1mm()
 {
     var oneMM = new Length(1, Unit.Millimeter);
     var twoMMs = new Length(2, Unit.Millimeter);
     (oneMM + oneMM).should_be(twoMMs);
 }
예제 #7
0
 public void should_equal_1_point_1cm_given_1mm_plus_1cm()
 {
     var oneMM = new Length(1, Unit.Millimeter);
     var oneCM = new Length(1, Unit.Centimeter);
     (oneMM + oneCM).should_be(new Length(1.1, Unit.Centimeter));
 }
예제 #8
0
 public void should_equal_1_point_001_mm_given_1mm_plus_1m()
 {
     var oneMM = new Length(1, Unit.Millimeter);
     var oneM = new Length(1, Unit.Meter);
     (oneMM + oneM).should_be(new Length(1.001, Unit.Meter));
 }
예제 #9
0
 public void should_equal_2_inch_given_1_inch_add_1_inch()
 {
     var oneInch = new Length(1, Unit.Inch);
     (oneInch + oneInch).should_be(new Length(2, Unit.Inch));
 }
예제 #10
0
 public void should_equal_1_point_0254_meter_given_one_meter_add_one_inch()
 {
     var oneInch = new Length(1, Unit.Inch);
     var oneMeter = new Length(1, Unit.Meter);
     (oneMeter + oneInch).should_be(new Length(1.0254, Unit.Meter));
 }
예제 #11
0
 public void setUp()
 {
     oneMeter = new Length(1, Unit.Meter);
     twoMeters = new Length(2, Unit.Meter);
     threeMeters = new Length(3, Unit.Meter);
 }