- remove not needed code

pull/57/head
Simon G 4 years ago
parent 5d31171c31
commit e062031aac
  1. 2
      LightweightIocContainer/Exceptions/CircularDependencyException.cs
  2. 8
      Test.LightweightIocContainer/IocContainerRecursionTest.cs

@ -44,7 +44,7 @@ namespace LightweightIocContainer.Exceptions
get
{
StringBuilder message = new($"Circular dependency has been detected when trying to resolve `{ResolvingType}`.\n");
if (ResolveStack == null || !ResolveStack.Any())
if (!ResolveStack.Any())
return message.ToString();
message.Append("Resolve stack that resulted in the circular dependency:\n");

@ -134,14 +134,6 @@ namespace Test.LightweightIocContainer
Assert.AreEqual(message, exception.Message);
}
[Test]
public void TestCircularDependencyExceptionNoStack()
{
CircularDependencyException circularDependencyException = new(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()
{

Loading…
Cancel
Save