public void Should_print_the_total_cost_for_passages() { var input = (Environment.CurrentDirectory + "../../../../mockTestData.txt"); var sw = new StringWriter(); Console.SetOut(sw); Calculator.Run(input); Assert.AreEqual("The total fee for the inputfile is 29", sw.ToString()); }
public void Should_throw_expected_exception_If_input_data_cannot_be_parsed() { var input = (Environment.CurrentDirectory + "../../../../mockInvalidPassageTestData.txt"); Assert.ThrowsException <FormatException>(() => Calculator.Run(input)); }
public void Should_throw_expected_exception_If_input_data_contains_multiple_dates() { var input = (Environment.CurrentDirectory + "../../../../mockMultipleDatesTestData.txt"); Assert.ThrowsException <ArgumentException>(() => Calculator.Run(input)); }