public void AddPlayer_SuccessfullyAdded() { // Create player and system. Player playerOne = CreatePlayer("Test_3_Player_1"); PlayerSystem system = CreateSystem(); system.Add(playerOne); // Ensure it was sucesffully added to the system. Assert.AreEqual(system.Get("Test_3_Player_1"), playerOne, "Single component not correctly inserted into the system."); Assert.AreEqual(system.Count(), 1, "Single component not correctly inserted into the system."); }
public void AddMultiplePlayers_SuccessfullyAdded() { // Create multiple players. Player playerOne = CreatePlayer("Test_4_Player_1"); Player playerTwo = CreatePlayer("Test_4_Player_2"); Player playerThree = CreatePlayer("Test_4_Player_3"); // Add players to the system. PlayerSystem system = CreateSystem(); List <Player> players = new List <Player>() { playerOne, playerTwo, playerThree }; system.Add(players); // Assert players added. Assert.AreEqual(system.Get("Test_4_Player_1"), playerOne, "Multiple components not correctly inserted into the system."); Assert.AreEqual(system.Get("Test_4_Player_2"), playerTwo, "Multiple components not correctly inserted into the system."); Assert.AreEqual(system.Get("Test_4_Player_3"), playerThree, "Multiple components not correctly inserted into the system."); Assert.AreEqual(system.Count(), 3, "Multiple components not correctly inserted into the system."); }