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);
        }
示例#2
0
 public ActionResult DeletePlayer(Player oldPlayer)
 {
     _league.DeleteAPlayer(oldPlayer);
     return(RedirectToAction("GetAllTeams"));
 }