public void TestNibblePredictor() { var rs = new NibbleRatingsService { AuditIt = true, WeeksToGoBack = 1 }; var np = new NibblePredictor { RatingsService = rs, AuditTrail = true }; var game = new NFLGame("2011:01-A"); // NO @ GB var result = np.PredictGame(game, new FakePredictionStorer(), Utility.StartOfSeason()); Assert.IsTrue(result.HomeWin()); Assert.IsTrue(result.HomeScore.Equals(23), string.Format("Home score should be 23 not {0}", result.HomeScore)); Assert.IsTrue(result.AwayScore.Equals(17), string.Format("Away score should be 17 not {0}", result.AwayScore)); }
public void TestNibblePredictionsFor2012() { const string season = "2012"; var fileout = string.Format("{0}\\{1}\\Projections\\Nibble.htm", Utility.OutputDirectory(), season); var rs = new NibbleRatingsService { AuditIt = true, WeeksToGoBack = 17 }; var ps = new DbfPredictionStorer(); var np = new NibblePredictor { RatingsService = rs, AuditTrail = false, StorePrediction = true, PredictionStorer = ps }; np.PredictSeason(season, Utility.StartOfSeason(season), fileout); Assert.IsTrue(File.Exists(fileout), string.Format("Cannot find {0}", fileout)); }