コード例 #1
0
 public StrengthOfScheduleJob(IKeepTheTime timeKeeper)
 {
     Name = "Strength of Schedule Report";
     TimeKeeper = timeKeeper;
      IsNflRelated = true;
      Logger = LogManager.GetCurrentClassLogger();
      SeasonScheduler = new SeasonScheduler();
 }
コード例 #2
0
 public GeneratePlayerProjectionsJob( IKeepTheTime timeKeeper )
 {
     Name = "Generate Player Projections";
     TimeKeeper = timeKeeper;
     Logger = LogManager.GetCurrentClassLogger();
     IsNflRelated = true;
     Report = new PlayerProjectionGenerator( playerCache: null ) {Name = Name};
      SeasonScheduler = new SeasonScheduler();
 }
コード例 #3
0
 public GameProjectionsJob(IKeepTheTime timeKeeper)
 {
     Name = "Game Projections";
      var week = string.Format( "{0:00}", timeKeeper.CurrentWeek( DateTime.Now ) );
      Report = new SeasonProjectionReport( timeKeeper.CurrentSeason( DateTime.Now ), week );
      TimeKeeper = timeKeeper;
      Logger = NLog.LogManager.GetCurrentClassLogger();
      IsNflRelated = true;
      SeasonScheduler = new SeasonScheduler();
 }
コード例 #4
0
 public void TestWeekKeyWildCard2014()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual("2014:18", sut.WeekKey(new DateTime(2015, 01, 01)));
 }
コード例 #5
0
 public void TestWeekKeyWeek1of2014()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual("2014:01", sut.WeekKey(new DateTime(2014, 09, 04)));
 }
コード例 #6
0
 public void TestWeekKey20150316()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual("2015:00", sut.WeekKey( new DateTime( 2015,03,16 ) ) );
 }
コード例 #7
0
 public void TestWeek1Of2014Ends()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual(new DateTime( 2014, 9, 8 ), sut.WeekEnds("2014", "01"));
 }
コード例 #8
0
 public void TestSeason2014()
 {
     var sut = new SeasonScheduler();
      Assert.IsTrue(sut.ScheduleAvailable("2014"));
 }
コード例 #9
0
 public void TestOpeningDaySeason2015()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual( new DateTime(1,1,1), sut.SeasonStarts("2015"));  // schedule not entered as of 2015-03-16
 }
コード例 #10
0
 public void TestOpeningDaySeason2014ViaWeek()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual(new DateTime(2014, 9, 4), sut.WeekStarts("2014","01"));
 }
コード例 #11
0
 public void TestCurrentSeason()
 {
     var sut = new SeasonScheduler();
      Assert.IsFalse( sut.ScheduleAvailable( "2015" ) );
 }
コード例 #12
0
 public void TestClosingDaySeason2014()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual(new DateTime(2015, 2, 1), sut.SeasonEnds("2014"));
 }
コード例 #13
0
 public void TestClosingDayRegularSeason2014()
 {
     var sut = new SeasonScheduler();
      Assert.AreEqual(new DateTime( 2014, 12, 28), sut.RegularSeasonEnds("2014"));
 }