public void YearDifferenceGivesBigFine() { string[] input = { "12 9 2016", "9 1 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(10000, result); }
public void FailingTest1() { string[] input = { "5 5 2014", "23 2 2014" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(1500, result); }
public void EightMonthsDifferenceGives4000Fine() { string[] input = { "12 9 2015", "9 1 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(4000, result); }
public void TwoMonthsDifferenceGives1000Fine() { string[] input = { "9 6 2015", "9 4 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(1000, result); }
public void ThreeDaysDifferenceGives45Fine() { string[] input = { "9 6 2015", "6 6 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(45, result); }
public void ActualLessThanExpectedGivesZeroFine() { string[] input = { "5 6 2015", "9 6 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(0, result); }
public void MatchingDatesGiveZeroFine() { string[] input = { "9 6 2015", "9 6 2015" }; int result = new LibraryFine(MoqUtil.SetupRandMock(input)).SolveIt(); Assert.AreEqual(0, result); }
public void LibraryFineTests() { /* * 6 6 2015 * 9 6 2016 * 0 */ /* * * 31 8 2004 * 20 1 2004 * 3500 */ //returned, expected Assert.AreEqual(0, LibraryFine.Fine("6", "6", "2015", "2016", "6", "9")); Assert.AreEqual(3500, LibraryFine.Fine("31", "8", "2004", "2004", "1", "20")); Assert.AreEqual(0, LibraryFine.Fine("7", "2", "1014", "1015", "1", "1")); }