public void testFirstLineOfLeagueReportSuccess() { leagueReportFile.parseLeagueFirstLineOfReport("LEAGUE STANDINGS FOR 2015 No Dice"); Assert.AreEqual(leagueReportFile.Season, "2015"); Assert.AreEqual(leagueReportFile.LeagueName, "No Dice"); Assert.AreEqual(leagueReportFile.SeasonTitle, "2015 No Dice"); leagueReportFile.parseLeagueFirstLineOfReport("LEAGUE STANDINGS FOR 2016 No Dice"); Assert.AreEqual(leagueReportFile.Season, "2016"); Assert.AreEqual(leagueReportFile.LeagueName, "No Dice"); Assert.AreEqual(leagueReportFile.SeasonTitle, "2016 No Dice"); leagueReportFile.parseLeagueFirstLineOfReport("LEAGUE STANDINGS FOR 999 No Dice"); Assert.AreEqual(leagueReportFile.Season, "999"); Assert.AreEqual(leagueReportFile.LeagueName, "No Dice"); Assert.AreEqual(leagueReportFile.SeasonTitle, "999 No Dice"); leagueReportFile.parseLeagueFirstLineOfReport("LEAGUE STANDINGS FOR 2015 TEST LEAGUE NAME"); Assert.AreEqual(leagueReportFile.Season, "2015"); Assert.AreEqual(leagueReportFile.LeagueName, "TEST LEAGUE NAME"); Assert.AreEqual(leagueReportFile.SeasonTitle, "2015 TEST LEAGUE NAME"); }
public void testFirstTeamLineOfReportFailure() { bool testFailed = false; try { teamReportFile.parseLeagueFirstLineOfReport("THIS IS NOT A VALID FIRST LINE"); } catch (Exception) { testFailed = true; } Assert.IsTrue(testFailed, "Expected Line is not a valid"); }