public void HappyPathTest() { var actualMpg = new MilesPerGallon { Miles = 540, Gallons = 18 }.Mpg; var expectedMpg = 30.0; Assert.AreEqual(expectedMpg, actualMpg, 0.1); }
public void ZeroGallonsExceptionTest() { var actualMpg = new MilesPerGallon { Miles = 540, Gallons = 0 }.Mpg; }
public void NegativeGallonsExceptionTest() { var actualMpg = new MilesPerGallon { Miles = 540, Gallons = -18 }.Mpg; }