protected int AddPlayer(int teamId, string name, int number) { var player = new Player(); player.Name = player.DisplayName = name; player.Number = number; player.TeamId = teamId; var mgr = new PlayerMgr(); mgr.Add(player); Assert.IsTrue(player.Id > 0); return(player.Id); }
protected void AddTeamPlayers(int teamId, int playerCount) { var playerMgr = new PlayerMgr(Context); for (int i = 0; i < playerCount; i++) { var player = new Player { Name = $"Player{i + 1}", DisplayName = $"Player{i + 1}", Number = i + 1, TeamId = teamId }; playerMgr.Add(player); } }