コード例 #1
0
        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);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
 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
 }
コード例 #4
0
        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);
        }
コード例 #5
0
        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
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
 public SavePlayerGameMetrics(PlayerGameProjectionMessage input)
 {
     Process(input);
 }
コード例 #9
0
 public SavePlayerGameMetrics( PlayerGameProjectionMessage input )
 {
     Process( input );
 }
コード例 #10
0
 private void Process(PlayerGameProjectionMessage input)
 {
     input.Dao = new DbfPlayerGameMetricsDao();
     input.Dao.ClearGame(input.Game.GameKey());
 }
コード例 #11
0
 public GetGamePrediction( PlayerGameProjectionMessage input )
 {
     Process( input );
 }
コード例 #12
0
 private static void Process( PlayerGameProjectionMessage input )
 {
     input.Prediction = input.Game.GetPrediction( "unit" );
 }
コード例 #13
0
 private static void Process(PlayerGameProjectionMessage input)
 {
     input.Prediction = input.Game.GetPrediction("unit");
 }
コード例 #14
0
 public GetGamePrediction(PlayerGameProjectionMessage input)
 {
     Process(input);
 }