Skip to content

Commit 9c15503

Browse files
committed
Tests fixed to DryIoc 4.1.0 updates
Simplify.DI.Tests switch to .NET Core 3.1
1 parent e8312b5 commit 9c15503

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Simplify.DI.Tests/DIContainerProviderTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void Resolve_NotRegistered_ContainerException()
2525

2626
var ex = Assert.Throws<ContainerException>(() => _provider.Resolve<NonDepFoo>());
2727
Assert.That(ex.Message, Does.StartWith("Unable to resolve"));
28-
Assert.That(ex.Message, Does.Contain("NonDepFoo IsResolutionCall"));
28+
Assert.That(ex.Message, Does.Contain("NonDepFoo (IsResolutionCall)"));
2929
}
3030

3131
[Test]
@@ -36,7 +36,7 @@ public void ScopedResolve_NotRegistered_ContainerException()
3636
{
3737
var ex = Assert.Throws<ContainerException>(() => scope.Resolver.Resolve<NonDepFoo>());
3838
Assert.That(ex.Message, Does.StartWith("Unable to resolve"));
39-
Assert.That(ex.Message, Does.Contain("NonDepFoo IsResolutionCall"));
39+
Assert.That(ex.Message, Does.Contain("NonDepFoo (IsResolutionCall)"));
4040
}
4141
}
4242

@@ -565,7 +565,7 @@ public void ScopedResolve_SingletonDependsOnScoped_ContainerException()
565565
// Act && Assert
566566

567567
var ex = Assert.Throws<ContainerException>(() => scope.Resolver.Resolve<IFoo>());
568-
Assert.That(ex.Message, Does.Contain("IBar as parameter \"bar\" IsSingletonOrDependencyOfSingleton reuse Scoped {Lifespan=100} lifespan shorter than its parent's: singleton"));
568+
Assert.That(ex.Message, Does.Contain("IBar as parameter \"bar\" (IsSingletonOrDependencyOfSingleton) reuse Scoped {Lifespan=100} lifespan shorter than its parent's: Resolution root singleton"));
569569
}
570570
}
571571

@@ -850,7 +850,7 @@ public void Verify_SingletonDependsOnScoped_ContainerException()
850850
// Act && Assert
851851

852852
var ex = Assert.Throws<ContainerException>(() => _provider.Verify());
853-
Assert.That(ex.Message, Does.Contain("IBar as parameter \"bar\" IsSingletonOrDependencyOfSingleton reuse Scoped {Lifespan=100} lifespan shorter than its parent's: singleton"));
853+
Assert.That(ex.Message, Does.Contain("IBar as parameter \"bar\" (IsSingletonOrDependencyOfSingleton) reuse Scoped {Lifespan=100} lifespan shorter than its parent's: Resolution root singleton"));
854854
}
855855

856856
// Note: this behavior check is not available

src/Simplify.DI.Tests/Simplify.DI.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
44
<Authors>Alexander Krylkov</Authors>
55
<Product>Simplify</Product>
66
<Description>Simplify.DI unit tests</Description>

0 commit comments

Comments
 (0)