예제 #1
0
 public void TestRatingsRetrieval()
 {
     var team = new NflTeam( "SF" );
     var rr = new UnitRatingsService();
     var currRatings = rr.GetUnitRatingsFor( team, new DateTime( 2014, 9, 7 ) );  //  first Sunday of the 2014 season
     const string expectedValue = "EACCBD";
     Assert.IsTrue( currRatings.Equals( expectedValue ),
         string.Format( "SF team rating should be {1} not {0}", currRatings, expectedValue ) );
 }
예제 #2
0
 public void TestNewRatingsRetrievalDB()
 {
     var team = new NflTeam( "DB" );
     var sut = new UnitRatingsService();
     var currRatings = sut.GetUnitRatingsFor( team, new DateTime( 2015, 11, 1 ) );  //  Date must be a Sunday
     const string expectedValue = "CECBAA";
     Assert.IsTrue( currRatings.Equals( expectedValue ),
         string.Format( "{0} team rating should be {2} not {1}", team.TeamCode, currRatings, expectedValue ) );
 }