コード例 #1
0
 public RecordActualMetricsJob(IKeepTheTime timeKeeper)
 {
     Name = "Record Actual Metrics";
      Console.WriteLine("Constructing {0} ...", Name);
      var season = timeKeeper.CurrentSeason( DateTime.Now );
      var week = string.Format( "{0:00}", timeKeeper.CurrentWeek(DateTime.Now) );
      Report = new RecordOfActualMetricsReport( season, week );
      TimeKeeper = timeKeeper;
      Logger = NLog.LogManager.GetCurrentClassLogger();
      IsNflRelated = true;
 }
コード例 #2
0
 public void TestPlayerRecordingMetrics()
 {
     var season = "2014";
      var week = "01";
      var gamecode = "M";
      var game = new NFLGame( string.Format("{0}:{1}-{2}", season, week, gamecode) );
      var sut = new RecordOfActualMetricsReport(season, week);
      var player = new NFLPlayer("KAEPCO01");
      player.TallyScores(season, Int32.Parse(week) );
      player.TallyStats(season, Int32.Parse(week) );
      Console.WriteLine(player.CurrentGameMetrics);
      var result = sut.RecordMetrics(player, game);
      Assert.IsTrue( result.Substring( 0, 4 ) != "Fail");
 }