コード例 #1
0
 public void TestDepthChartRatingsOut()
 {
     var sut = new NflTeam("SF") { Ratings = "CBEAAB" };
      var spreadRatings = sut.RatingsOut();
      Assert.AreEqual("C B E - A A B : 39", spreadRatings);
 }
コード例 #2
0
 public void TestDepthChartRatingsOutNj()
 {
     var sut = new NflTeam("NJ");
      var spreadRatings = sut.RatingsOut();
      Assert.AreNotEqual("? A ? - ? ? ?", spreadRatings);
 }
コード例 #3
0
        private string GenerateBody()
        {
            var bodyOut = new StringBuilder();
             NflTeam = new NflTeam(TeamCode);
             NflTeam.LoadTeam();
             PlayerCount = NflTeam.PlayerList.Count;
            #if DEBUG
             Utility.Announce(string.Format("   {0} Roster Count : {1}", TeamCode, PlayerCount));
            #endif
             bodyOut.AppendLine(NflTeam.RatingsOut() + "    " + NflTeam.SeasonProjectionOut() );
             bodyOut.AppendLine();
             bodyOut.AppendLine( NflTeam.ScheduleHeaderOut() );
             bodyOut.AppendLine( NflTeam.ScheduleOut() );
             bodyOut.AppendLine( NflTeam.ScoreCountsOut() );

             bodyOut.AppendLine();
             bodyOut.AppendLine();
             AppendPlayerLine( bodyOut, "QB" );
             AppendPlayerLine(bodyOut, "Q2");
             AppendPlayerLine(bodyOut, "RB");
             AppendPlayerLine(bodyOut, "R2");
             AppendPlayerLine(bodyOut, "RR");
             AppendPlayerLine(bodyOut, "3D");
             AppendPlayerLine(bodyOut, "SH");
             AppendPlayerLine(bodyOut, "FB");
             AppendPlayerLine(bodyOut, "W1");
             AppendPlayerLine(bodyOut, "W2");
             AppendPlayerLine(bodyOut, "W3");
             AppendPlayerLine(bodyOut, "TE");
             AppendPlayerLine(bodyOut, "T2");
             AppendPlayerLine(bodyOut, "PR");
             AppendPlayerLine(bodyOut, "KR");
             AppendPlayerLine(bodyOut, "PK");
             AppendPlayerLine(bodyOut, "INJ");
             AppendPlayerLine(bodyOut, "SUS");
             AppendPlayerLine(bodyOut, "HO");

             bodyOut.AppendLine();
             bodyOut.AppendLine(string.Format("   {0} Roster Count : {1}", TeamCode, PlayerCount));
             bodyOut.AppendLine();
             bodyOut.AppendLine();
             NflTeam.LoadPassUnit();
             bodyOut.AppendLine( string.Format( "Pass Unit : ({0})", NflTeam.PoRating() ) );
             var lines = NflTeam.PassUnit.DumpUnit();
             foreach ( var line in lines )
            bodyOut.AppendLine( line );

             NflTeam.LoadRushUnit();
             bodyOut.AppendLine( string.Format( "Rush Unit : ({0})", NflTeam.RoRating() ) );
             lines = NflTeam.RushUnit.DumpUnit();
             foreach ( var line in lines )
            bodyOut.AppendLine( line );

             return bodyOut.ToString();
        }