public void Generate2010SpreadTipsTest() { // Arrange var storer = new DbfPredictionStorer(); var sut = new SpreadTips(storer); // Act sut.SaveTipsFor("2010"); // Assert Assert.IsTrue(true); }
public void TipSeason(string season) { // load a season var nflSeason = new NflSeason(season); var predictionStorer = new DbfPredictionStorer(); var mp = new MillerPredictor { AuditTrail = true }; // for each game foreach (NFLGame game in nflSeason.GameList) { if (!game.IsPlayoff()) { // predict game var result = mp.PredictGame(game, predictionStorer, game.GameDate); } } }
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)); }
public void TestDbfPredictionStorer() { var game = new NFLGame("2006:02-A"); // BB @ MD var result = new NFLResult("MD", 24, "BB", 20); result.HomeYDp = 250; result.HomeYDr = 116; result.AwayYDp = 350; result.AwayYDr = 68; result.AwayTDr = 1; var storer = new DbfPredictionStorer(); storer.StorePrediction("test", game, result); var getter = new DbfPredictionQueryMaster(); var prediction = getter.Get("test", "2006", "02", "A"); Assert.IsTrue(prediction.HomeScore.Equals(24), "Home score should be 24"); Assert.IsTrue(prediction.AwayScore.Equals(20), "Away score should be 20"); Assert.IsTrue(prediction.NflResult.AwayTDr.Equals(1), "Away TDr should be 1"); Assert.IsTrue(prediction.NflResult.AwayYDr.Equals(68), "Away YDr should be 68"); }