Unit tests
async void StartGame(GameMode mode)
These tests are for the StartGame method which sets up the multiplayer game for the current player and scene depending on the GameMode (Host/Client connection)
Test for singleplayer: async void TestStartGameSingle(GameMode mode)
"mode" variable will be set to GameMode.Host and will test if the current scene is valid, and the current user is connected to the multiplayer server
Test for multiplayer: async void TestStartGameMulti(GameMode mode)
Peer mode will be set to "multiple" to allow the Unity instance to make multiple connections. "mode" variable will be set to GameMode.Host for first Network Runner and GameMode.Client for each subsequent connection. This will test for a valid scene and that each user is connected to the Host connection
public void SpawnRooms(int[,] roomTypes )
This test is for the SpawnRooms method, which spawns all rooms dependent on the input matrix and also creates the spawn room for the player and the boss.
public IEnumerator checkMap()
As this test is based on the game running the input parameter is the scene being loaded asynchronously. The result to this test will be to ensure that the correct rooms spawned and that the player and boss have been spawned correctly.
public int getSpawnCounter()
This test is for the getSpawnCounter method which is what creates the rooms in the procedurely generated layout.
public IEnumerator checkRoomAmount()
As this test is based on the game running the input parameter is the scene being loaded asynchronously. The result will be to ensure that the correct amount of rooms have been spawned
public void Awake() [PlayerStats]
This test is to check the player stats generated by the character sprites when they appear (Awake) on screen.
public void CheckBaseStats()
This test checks that the player obtains the base stats when instantiated.
public void IncreaseStat()
This test is to check for a change in stats from the IncreaseStat function.
public void Increasable()
The parameters for this test are the Strength, Speed, and Health values of the player. The function is called and the expected values would be the Instantiation value + Increasable(): Int
public void Awake() [ExperienceManager]
This test is to ensure only one ExperienceManager is created after sprites are created on screen.
public IEnumerator Singleton_Instance()
The ExperienceManager fires off events that the LevelManager listens to. If there are multiple instances of this object it will fire off multiple events. The method ensures that there is only one instance of this object.