public void usingDestroyedSingletonProviderThrows() { SingletonProvider provider = new SingletonProvider(typeof(Clazz), injector); provider.Destroy(); provider.Apply(null, injector, null); }
public void DestroyingSingletonProviderInvokesPreDestroyMethodsOnSingleton() { SingletonProvider provider = new SingletonProvider(typeof(Clazz), injector); Clazz singleton = provider.Apply(null, injector, null) as Clazz; provider.Destroy(); Assert.True(singleton.preDestroyCalled); }