public void PlayerDetails() { string fName = "John"; string lName = "Smith"; int age = 15; string guardian = "Julie"; string pContact = "40404040"; string medical = "sickish"; Player player = new Player(fName, lName, age, guardian, pContact, medical); Assert.AreEqual(string.Format("fname: {0}, lname: {1}, age: {2}, guardian: {3}, contact: {4}, medical: {5}, ID: {6}", fName, lName, age, guardian, pContact, medical, 0), player.Details()); }
public void MOCKFileHandlerDeleteTeamPlayer() { var teamID = 1; var playerID = 1; var testHandler = new MOCKFileHandler(); testHandler.LoadPlayers(); testHandler.LoadTeams(); var testHandlerPlayers = testHandler.GetPlayers(); var testPlayers = TestPlayers(); var team = testHandler.GetTeam(teamID); team.SetTeamID(teamID); var player = testHandler.GetPlayer(1); var testPlayer = new Player("john", "smith", 24, "", "40404040", ""); testPlayer.SetP_ID(playerID); Assert.AreEqual(player.Details(), testPlayer.Details()); testHandler.DeleteTeamPlayer(team.GetTeamID(), playerID); Assert.AreEqual(0, testHandler.GetTeam(1).GetPlayerIDs().Count); team.RemovePlayer(player.GetP_ID()); Assert.AreEqual(team.GetPlayerIDs(), testHandler.GetTeam(teamID).GetPlayerIDs()); }