Skip to content

Commit

Permalink
Fix not passed parameter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Jun 9, 2023
1 parent dc0485d commit 433c672
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resolution/ResolutionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ internal static ResolutionContext BeginNullableTopLevelContext(
new(initialScopeNames,
currentContainerContext,
resolutionBehavior,
true,
isRequestedFromRoot,
true,
false,
dependencyOverrides,
Expand Down
10 changes: 10 additions & 0 deletions test/StandardResolveTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,16 @@ public void StandardResolveTests_Resolve_None_Of_The_Constructors_Selected()
Assert.Equal(typeof(Test222), exception.Type);
}

[Fact]
public void StandardResolveTests_Resolve_Scoped_Ok()
{
using IStashboxContainer container = new StashboxContainer(config => config.WithLifetimeValidation());
container.RegisterScoped<Test1>();
var inst = container.BeginScope().ResolveOrDefault<Test1>();

Assert.NotNull(inst);
}

[Fact]
public void StandardResolveTests_Resolve_Scoped_NullDependency()
{
Expand Down

0 comments on commit 433c672

Please sign in to comment.