public void TestInvalidInputOption(double expected, double given, string text) { Inch inch = new Inch(); try { //Exception should be thrown inch.Calculate(given, text); } catch (Exception e) { Console.WriteLine(e.Message); Assert.Pass(); } }
public void TestInches(double expected, double given, string text) { Inch inch = new Inch(); Assert.AreEqual(expected, inch.Calculate(given, text)); }