diff --git a/Test.LightweightIocContainer/IocContainerRecursionTest.cs b/Test.LightweightIocContainer/IocContainerRecursionTest.cs index c14f189..9a0c069 100644 --- a/Test.LightweightIocContainer/IocContainerRecursionTest.cs +++ b/Test.LightweightIocContainer/IocContainerRecursionTest.cs @@ -125,6 +125,14 @@ namespace Test.LightweightIocContainer Assert.AreEqual(message, exception.Message); } + [Test] + public void TestCircularDependencyExceptionNoStack() + { + CircularDependencyException circularDependencyException = new CircularDependencyException(typeof(IFoo), null); + string message = $"Circular dependency has been detected when trying to resolve `{typeof(IFoo)}`.\n"; + Assert.AreEqual(message, circularDependencyException.Message); + } + [Test] public void TestNonCircularDependencies() {