diff --git a/test/DryIoc.IssuesTests/GHIssue399_Func_dependency_on_Singleton_resolved_under_scope_breaks_after_disposing_scope_when_WithFuncAndLazyWithoutRegistration.cs b/test/DryIoc.IssuesTests/GHIssue399_Func_dependency_on_Singleton_resolved_under_scope_breaks_after_disposing_scope_when_WithFuncAndLazyWithoutRegistration.cs index beb8e7fb3..007c9e111 100644 --- a/test/DryIoc.IssuesTests/GHIssue399_Func_dependency_on_Singleton_resolved_under_scope_breaks_after_disposing_scope_when_WithFuncAndLazyWithoutRegistration.cs +++ b/test/DryIoc.IssuesTests/GHIssue399_Func_dependency_on_Singleton_resolved_under_scope_breaks_after_disposing_scope_when_WithFuncAndLazyWithoutRegistration.cs @@ -15,7 +15,7 @@ public int Run() [Test] public void Test1() { - using var container = new Container(rules => rules.WithFuncAndLazyWithoutRegistration()); + var container = new Container(rules => rules.WithFuncAndLazyWithoutRegistration()); container.Register(Reuse.Singleton); container.Register(Reuse.Transient); @@ -29,6 +29,8 @@ public void Test1() var dep = factory.Create(); Assert.IsNotNull(dep); + + container.Dispose(); } class DepFactory @@ -47,4 +49,4 @@ public Dep Create() class Dep { } } -} \ No newline at end of file +}