public void CanDeletePlayer(int playerId, string name, bool expectedResults) { League league = new League(); Player player = new Player(); player.PlayerId = playerId; player.TeamName = name; var response = league.DeleteAPlayer(player); Assert.AreEqual(response, expectedResults); }
public ActionResult DeletePlayer(Player oldPlayer) { _league.DeleteAPlayer(oldPlayer); return(RedirectToAction("GetAllTeams")); }