- add test case (no stack available)

pull/37/head
Simon Gockner 6 years ago
parent a2b2334767
commit d8dfb7a3cd
  1. 8
      Test.LightweightIocContainer/IocContainerRecursionTest.cs

@ -125,6 +125,14 @@ namespace Test.LightweightIocContainer
Assert.AreEqual(message, exception.Message); 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] [Test]
public void TestNonCircularDependencies() public void TestNonCircularDependencies()
{ {

Loading…
Cancel
Save