com.unity.multiplayer.samples.coop
com.unity.multiplayer.samples.coop copied to clipboard
feat: connection management tests [MTT-3969]
Description
This PR adds tests for connection management.
It also modifies ConnectionManager and the ConnectionStates to allow for easier testing. It passes the NetworkManager via DI and removes usage of NetworkManager.Singleton inside it. It also makes it so the testing assembly can access its internal fields and methods.
Finally, it modifies SceneLoaderWrapper so that it can easily be inherited and its main behavior can be overwritten. This is used in the tests to create a stub so that the tests don't load any scene.
Issue Number(s)
Contribution checklist
- [x] Tests have been added for boss room and/or utilities pack
- [x] Release notes have been added to the project changelog file and/or package changelog file
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] JIRA ticket ID is in the PR title or at least one commit message
- [x] Include the ticket ID number within the body message of the PR to create a hyperlink
The tests are currently not passing because of a bug with NetworkedMessageChannels that is fixed in #670 . After 670 is merged, this will be fine