public void TestPullMetrics() { var msg = new PlayerGameProjectionMessage(); msg.Game = new NFLGame("2013:13-M"); var sut = new GetGamePrediction(msg); var sut2 = new PullMetricsFromPrediction(msg); Assert.IsNotNull(sut2); }
public void TestGettingGamePrediction() { var msg = new PlayerGameProjectionMessage(); msg.Game = new NFLGame("2013:06-M"); var sut = new GetGamePrediction(msg); Assert.IsNotNull(msg.Prediction); Utility.Announce(msg.Prediction.PredictedScore()); }
private static void Process( PlayerGameProjectionMessage input ) { var nMetrics = 0; foreach ( var pgm in input.Game.PlayerGameMetrics ) { pgm.Save( input.Dao ); nMetrics++; } #if DEBUG Utility.Announce( string.Format( "Metrics saved {0} for {1} to {2}", nMetrics, input.Game, Utility.TflWs.NflConnectionString ) ); #endif }
public void TestAllocation() { var msg = new PlayerGameProjectionMessage(); msg.Game = new NFLGame("2013:01-B"); var sut = new GetGamePrediction(msg); Assert.IsNotNull(msg.Prediction); Utility.Announce(msg.Prediction.PredictedScore()); var sut2 = new PullMetricsFromPrediction(msg); Assert.IsNotNull(msg.Game.PlayerGameMetrics); var sut3 = new SavePlayerGameMetrics(msg); }
private static void Process(PlayerGameProjectionMessage input) { var nMetrics = 0; foreach (var pgm in input.Game.PlayerGameMetrics) { pgm.Save(input.Dao); nMetrics++; } #if DEBUG Utility.Announce($@"Metrics saved { nMetrics } for {input.Game} to {Utility.TflWs.NflConnectionString}" ); #endif }
public void TestASavingMetrics() { var msg = new PlayerGameProjectionMessage(); msg.Game = new NFLGame("2013:01-B"); var sut = new GetGamePrediction(msg); var sut2 = new PullMetricsFromPrediction(msg); var sut3 = new SavePlayerGameMetrics(msg); var dpgmDoa = new DbfPlayerGameMetricsDao(); List <PlayerGameMetrics> pgmList = msg.Game.PlayerGameMetrics; var expectedPgm = pgmList.FirstOrDefault(); var pgm = dpgmDoa.Get(expectedPgm.PlayerId, expectedPgm.GameKey); Assert.IsNotNull(pgm); }
public void TestVulture() { var msg = new PlayerGameProjectionMessage(); msg.Game = new NFLGame("2013:04-I"); msg.Game.PlayerGameMetrics = new List <PlayerGameMetrics>(); var sut = new GetGamePrediction(msg); Assert.IsNotNull(msg.Prediction); Utility.Announce(msg.Prediction.PredictedScore()); var sut2 = new PullMetricsFromPrediction(msg); Assert.IsNotNull(msg.Game.PlayerGameMetrics); Assert.IsTrue(msg.Game.PlayerGameMetrics.Count > 0); }
public SavePlayerGameMetrics(PlayerGameProjectionMessage input) { Process(input); }
public SavePlayerGameMetrics( PlayerGameProjectionMessage input ) { Process( input ); }
private void Process(PlayerGameProjectionMessage input) { input.Dao = new DbfPlayerGameMetricsDao(); input.Dao.ClearGame(input.Game.GameKey()); }
public GetGamePrediction( PlayerGameProjectionMessage input ) { Process( input ); }
private static void Process( PlayerGameProjectionMessage input ) { input.Prediction = input.Game.GetPrediction( "unit" ); }
private static void Process(PlayerGameProjectionMessage input) { input.Prediction = input.Game.GetPrediction("unit"); }
public GetGamePrediction(PlayerGameProjectionMessage input) { Process(input); }