Skip to content

Commit 70d0170

Browse files
committed
update tests for netcore
1 parent fdac532 commit 70d0170

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

source/Unity/Tests/Unity.NetCore.Tests/ObjectBuilder/DynamicMethodCallFixture.NetCore.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,11 @@ public TestSingleArgumentMethodSelectorPolicy(IDependencyResolverPolicy resolver
309309

310310
public IEnumerable<SelectedMethod> SelectMethods(IBuilderContext context, IPolicyList resolverPolicyDestination)
311311
{
312-
var key = Guid.NewGuid().ToString();
313-
resolverPolicyDestination.Set<IDependencyResolverPolicy>(this.resolverPolicy, key);
314312
var method =
315313
new SelectedMethod(
316314
// .GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly)[0]
317315
typeof(T).GetTypeInfo().DeclaredMethods.First(m => m.IsPublic && !m.IsStatic));
318-
method.AddParameterKey(key);
316+
method.AddParameterResolver(this.resolverPolicy);
319317

320318
yield return method;
321319
}

source/Unity/Tests/Unity.NetCore.Tests/ObjectBuilder/DynamicMethodPropertySetterFixture.NetCore.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,10 @@ public TestSinglePropertySelectorPolicy(IDependencyResolverPolicy resolverPolicy
173173

174174
public IEnumerable<SelectedProperty> SelectProperties(IBuilderContext context, IPolicyList resolverPolicyDestination)
175175
{
176-
var key = Guid.NewGuid().ToString();
177-
resolverPolicyDestination.Set<IDependencyResolverPolicy>(this.resolverPolicy, key);
178176
yield return
179177
new SelectedProperty(
180178
typeof(T).GetTypeInfo().DeclaredProperties.First(),
181-
key);
179+
this.resolverPolicy);
182180
}
183181
}
184182

0 commit comments

Comments
 (0)