public void TestPoRatings() { var sut = new NflTeam("SF"); sut.Ratings = "ABCDEF"; var rating = sut.PoRating(); Assert.AreEqual("A", rating); }
private string GenerateBody() { var bodyOut = new StringBuilder(); NflTeam = new NflTeam(TeamCode); NflTeam.LoadTeam(); PlayerCount = NflTeam.PlayerList.Count; TraceIt($" {TeamCode} Roster Count : {PlayerCount}"); 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( $" {TeamCode} Roster Count : {PlayerCount}"); bodyOut.AppendLine(); bodyOut.AppendLine(); NflTeam.LoadPassUnit(); bodyOut.AppendLine( $"Pass Unit : ({NflTeam.PoRating()})"); var lines = NflTeam.PassUnit.DumpUnit(); foreach (var line in lines) { bodyOut.AppendLine(line); } NflTeam.LoadRushUnit(); bodyOut.AppendLine( $"Rush Unit : ({NflTeam.RoRating()})"); lines = NflTeam.RunUnit.DumpUnit(); foreach (var line in lines) { bodyOut.AppendLine(line); } return(bodyOut.ToString()); }