public void TestRosterSub(int startID, bool success) { SetPlayers(); SetFreeAgents(); players[9].position = Position.WideReceiver; var roster = new Roster(players); IESPNTeam espnTeam = new ESPNTeamTest(roster, freeAgents); var manager = new RosterManager(roster, espnTeam); Player starter = roster.starters[startID]; Player newGuy = manager.GetSub(startID, 2); //sub out starter 0 Assert.IsTrue(newGuy.IsNull() ^ success); }
public void TestManageTeam() { SetPlayers(); SetFreeAgents(); int currWeek = 17; players[0].eligibility = Eligibility.Out; players[1].eligibility = Eligibility.Injured; players[5].byeWeek = currWeek; Player kyle = players[10]; Player george = players[6]; Player quinn = freeAgents[0]; var roster = new Roster(players); var espnTeam = new ESPNTeamTest(roster, freeAgents); var manager = new RosterManager(roster, espnTeam); manager.ManageTeam(currWeek); Assert.AreEqual(manager.Roster.starters[0], kyle); Assert.AreEqual(manager.Roster.starters[5], george); Assert.AreEqual(manager.Roster.starters[1], quinn); }