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)); }
public void ShouldThrowExceptionWhenAddWithDifferentUnits() { var twelveInches = new Quantity(12, LengthUnit.INCH); var twoTBSP = new Quantity(2, VolumeUnit.TBSP); twelveInches.Add(twoTBSP); }