public void TestPlayerTallying() { var sut = new NFLPlayer("KAEPCO01"); sut.TallyScores("2014", 1); Console.WriteLine(sut.CurrentGameMetrics); Assert.IsTrue( sut.CurrentGameMetrics.TDp == 2); Assert.IsTrue(sut.CurrentGameMetrics.TDr == 0); Assert.IsTrue(sut.CurrentGameMetrics.TDc == 0); }
public void TestPlayerTallyingFieldGoals() { var sut = new NFLPlayer("BAILDA01"); sut.TallyScores("2014", 1); Console.WriteLine(sut.CurrentGameMetrics); Assert.IsTrue(sut.CurrentGameMetrics.TDp == 0); Assert.IsTrue(sut.CurrentGameMetrics.TDr == 0); Assert.IsTrue(sut.CurrentGameMetrics.TDc == 0); Assert.IsTrue(sut.CurrentGameMetrics.FG == 1); Assert.IsTrue(sut.CurrentGameMetrics.Pat == 2); }
public void TestPlayerRecordingMetrics() { var season = "2014"; var week = "01"; var gamecode = "M"; var game = new NFLGame( string.Format("{0}:{1}-{2}", season, week, gamecode) ); var sut = new RecordOfActualMetricsReport(season, week); var player = new NFLPlayer("KAEPCO01"); player.TallyScores(season, Int32.Parse(week) ); player.TallyStats(season, Int32.Parse(week) ); Console.WriteLine(player.CurrentGameMetrics); var result = sut.RecordMetrics(player, game); Assert.IsTrue( result.Substring( 0, 4 ) != "Fail"); }