In ZenjectIntegrationTestFixture, Assert.IsNull(_sceneContext) assert fail, altought _sceneContext is null.
Reproduction, launch two consecutive integration test that load a scene.
The first test creates a _sceneContext
The second test destroys the first _sceneContext, but _sceneContext is not null, it is "fake null" instead.
Why is this? because _sceneContext is a monobehaviour and it has its own null state, but Assert.IsNull doesn't understand this.
In ZenjectIntegrationTestFixture, Assert.IsNull(_sceneContext) assert fail, altought _sceneContext is null.
Reproduction, launch two consecutive integration test that load a scene. The first test creates a _sceneContext The second test destroys the first _sceneContext, but _sceneContext is not null, it is "fake null" instead.
Why is this? because _sceneContext is a monobehaviour and it has its own null state, but Assert.IsNull doesn't understand this.
Fix suggestion: //Assert.IsNull(_sceneContext); Assert.That(_sceneContext == null);
== operator is overloaded in Unity to take this into account.
Additional info: https://blogs.unity3d.com/es/2014/05/16/custom-operator-should-we-keep-it/ Regards.