@@ -24,7 +24,7 @@ public void Resolve_NotRegistered_ContainerException()
2424 // Act & Assert
2525
2626 var ex = Assert . Throws < ContainerException > ( ( ) => _provider . Resolve < NonDepFoo > ( ) ) ;
27- Assert . That ( ex . Message , Does . StartWith ( "Unable to resolve " ) ) ;
27+ Assert . That ( ex . Message , Does . StartWith ( "code: UnableToResolveUnknownService " ) ) ;
2828 Assert . That ( ex . Message , Does . Contain ( "NonDepFoo (IsResolutionCall)" ) ) ;
2929 }
3030
@@ -35,7 +35,7 @@ public void ScopedResolve_NotRegistered_ContainerException()
3535 using ( var scope = _provider . BeginLifetimeScope ( ) )
3636 {
3737 var ex = Assert . Throws < ContainerException > ( ( ) => scope . Resolver . Resolve < NonDepFoo > ( ) ) ;
38- Assert . That ( ex . Message , Does . StartWith ( "Unable to resolve " ) ) ;
38+ Assert . That ( ex . Message , Does . StartWith ( "code: UnableToResolveUnknownService " ) ) ;
3939 Assert . That ( ex . Message , Does . Contain ( "NonDepFoo (IsResolutionCall)" ) ) ;
4040 }
4141 }
@@ -49,7 +49,7 @@ public void Resolve_ScopeRegisteredAndRequestedOutsideOfTheScope_ContainerExcept
4949 // Act & Assert
5050
5151 var ex = Assert . Throws < ContainerException > ( ( ) => _provider . Resolve < NonDepFoo > ( ) ) ;
52- Assert . That ( ex . Message , Does . StartWith ( "No current scope is available: probably you are registering to, or resolving from outside of the scope. " ) ) ;
52+ Assert . That ( ex . Message , Does . StartWith ( "code: NoCurrentScope " ) ) ;
5353 }
5454
5555 [ Test ]
@@ -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: Resolution root singleton " ) ) ;
568+ Assert . That ( ex . Message , Does . Contain ( "code: DependencyHasShorterReuseLifespan " ) ) ;
569569 }
570570 }
571571
@@ -798,7 +798,7 @@ public void Verify_MissingDependencyRegistration_ContainerException()
798798 // Act && Assert
799799
800800 var ex = Assert . Throws < ContainerException > ( ( ) => _provider . Verify ( ) ) ;
801- Assert . That ( ex . Message , Does . StartWith ( "Unable to resolve " ) ) ;
801+ Assert . That ( ex . Message , Does . StartWith ( "code: UnableToResolveUnknownService " ) ) ;
802802 Assert . That ( ex . Message , Does . Contain ( "IBar as parameter \" bar\" " ) ) ;
803803 }
804804
@@ -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: Resolution root singleton " ) ) ;
853+ Assert . That ( ex . Message , Does . Contain ( "code: DependencyHasShorterReuseLifespan " ) ) ;
854854 }
855855
856856 // Note: this behavior check is not available
0 commit comments