diff --git a/Test.LightweightIocContainer.Validation/IocValidatorTest.cs b/Test.LightweightIocContainer.Validation/IocValidatorTest.cs index 484bc40..4a35639 100644 --- a/Test.LightweightIocContainer.Validation/IocValidatorTest.cs +++ b/Test.LightweightIocContainer.Validation/IocValidatorTest.cs @@ -150,13 +150,13 @@ public class IocValidatorTest if (aggregateException?.InnerExceptions[0] is not NoMatchingConstructorFoundException noMatchingConstructorFoundException) { - Assert.Fail("inner exception is not of type NoMatchingConstructorFoundException"); + Assert.Fail($"{nameof(aggregateException.InnerExceptions)} is not of type {nameof(NoMatchingConstructorFoundException)}"); return; } if (noMatchingConstructorFoundException.InnerExceptions[0] is not ConstructorNotMatchingException iTest2CtorNotMatchingException) { - Assert.Fail("inner exception is not of type ConstructorNotMatchingException"); + Assert.Fail($"{nameof(aggregateException.InnerExceptions)} is not of type {nameof(ConstructorNotMatchingException)}"); return; } @@ -182,6 +182,6 @@ public class IocValidatorTest if (exception is NoMatchingConstructorFoundException noMatchingConstructorFoundException) Assert.AreEqual(typeof(T), noMatchingConstructorFoundException.Type); else - Assert.Fail($"Exception is no NoMatchingConstructorFoundException, actual type: {exception?.GetType()}"); + Assert.Fail($"Exception is no {nameof(NoMatchingConstructorFoundException)}, actual type: {exception?.GetType()}"); } } \ No newline at end of file