public void CreateNonMonoServiceDeleteItAndResolveIt() { Debug.logger.logEnabled = false; ServiceLocatorManager.Register <IMockInterface>(new MockServiceOldFeature()); ServiceLocatorManager.Reset(); IMockInterface service = ServiceLocatorManager.Resolve <IMockInterface>(); Assert.IsNull(service); }
public IEnumerator CreateMonoServiceResetItAndResolveIt() { Debug.logger.logEnabled = false; ServiceLocatorManager.Register <IMockInterface>(ServiceLocatorManager.AsMono <MonoMockServiceFeature>()); ServiceLocatorManager.Reset(); IMockInterface service = ServiceLocatorManager.Resolve <IMockInterface>(); Assert.IsNull(service); yield return(new WaitForEndOfFrame()); var obj = Object.FindObjectOfType <MonoMockServiceFeature>(); Assert.IsNull(obj); }