Exemplo n.º 1
0
        // Swaps player's team by changing TeamID
        public void TradePlayer(int PlayerID, int TeamID)
        {
            var update = new Update();

            update.TradePlayer(PlayerID, TeamID);
        }
Exemplo n.º 2
0
        public void TradePlayerTest(int playerID, int tradeTeamId)
        {
            var repo = new Update();
            repo.TradePlayer(playerID, tradeTeamId);

            var readRepo = new Read();
            var players = readRepo.GetTeamRoster(tradeTeamId);
            var player = players.FirstOrDefault(p => p.PlayerID == playerID);
            Assert.AreEqual(player.PlayerID, playerID);
        }