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 ) ); }
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 ) ); }
public void TestRatingsTeamLoadingNo() { var teamList = new List<NflTeam>(); var sut = new UnitRatingsService(); sut.TallyTeam( teamList, "2013", new DateTime( 2013, 10, 17 ), "NO" ); var sutTeam = teamList[0]; Assert.IsTrue( sutTeam.GameList.Count.Equals( 16 ) ); Assert.IsTrue( sutTeam.TotYdp.Equals( 1957 ), string.Format( "Was expecting {0} but got {1}", 1957, sutTeam.TotYdp ) ); }
public void TestUnitRatingsRetrieval() { var sut = new UnitRatingsService(); var bActual = sut.HaveAlreadyRated( new DateTime( 2015, 11, 1 ) ); Assert.IsTrue( bActual ); }