コード例 #1
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);
        }
コード例 #2
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);
        }