public void SingletonIsDestroyedWhenCallingDestroySingleton() { Assert.NotNull(TestSingletonWithName.Instance); TestSingletonWithName.DestroySingleton(); Assert.False(TestSingletonWithName.Exists); Assert.IsEmpty(Object.FindObjectsOfType <TestSingletonWithName>(), "Expected no singleton objects to exists after destroy was called"); }
public void Teardown() { TestSingletonWithName.DestroySingleton(); TestSingletonWithDefaultName.DestroySingleton(); EditorApplication.isPlaying = false; }