public void CanPlayerBeSavedLoadedAndDeleted() { Player testPlayer = new Player() { Email = "email", FirstName = "fornavn", LastName = "efternavn", PhoneNr = "12345678" }; Player facitPlayer = new Player() { Email = "email", FirstName = "fornavn", LastName = "efternavn", PhoneNr = "12345678" }; testPlayer.PlayerId = BusinessFacade.SavePlayer(testPlayer); facitPlayer.PlayerId = testPlayer.PlayerId; Assert.AreSame(facitPlayer, BusinessFacade.GetPlayerById(testPlayer.PlayerId)); BusinessFacade.DeletePlayer(testPlayer); Assert.AreNotSame(facitPlayer, BusinessFacade.GetPlayerById(testPlayer.PlayerId)); }
private void btn_Delete_Click(object sender, RoutedEventArgs e) { BusinessFacade.DeletePlayer(ChosenPlayer); }