Пример #1
0
 public void Given12InchesAdd2FeetShouldEqal3Feet()
 {
     var twelveInches = new Quantity(12, LengthUnit.INCH);
     var oneFeet = new Quantity(2, LengthUnit.FEET);
     var threeFeet = new Quantity(3, LengthUnit.FEET);
     Assert.AreEqual(threeFeet, twelveInches.Add(oneFeet));
 }
Пример #2
0
 public void ShouldThrowExceptionWhenAddWithDifferentUnits()
 {
     var twelveInches = new Quantity(12, LengthUnit.INCH);
     var twoTBSP = new Quantity(2, VolumeUnit.TBSP);
     twelveInches.Add(twoTBSP);
 }