public void RegisterSingletonInstance() { IOne a, b, c, d; using (var resolver = new TactContainer(new InMemoryLog())) { a = new One(); resolver.RegisterInstance(a); b = resolver.Resolve <IOne>(); using (var child = resolver.BeginScope()) { c = child.Resolve <IOne>(); d = child.Resolve <IOne>(); } Assert.Same(a, b); Assert.Same(a, c); Assert.Same(a, d); Assert.False(a.IsDisposed); } Assert.True(a.IsDisposed); }