Example:
Class 1 asks for:
public class SomeClass
{
public SomeClass(int someInt) { // do stuff }
public SomeClass(string someString) { // do stuff }
}
And the DI setup looks like:
TestBuilder
.AddDependencyInstance(10)
.AddDependencyInstance("hello!")
This appears to be a silent failure (real world use case used factory pattern AddDependencyService(Func<,>) which may matter.) This should throw a helpful error that you cannot do this.
Assess if this should be an error on .Build() instead of during a test run.
Example:
Class 1 asks for:
And the DI setup looks like:
This appears to be a silent failure (real world use case used factory pattern AddDependencyService(Func<,>) which may matter.) This should throw a helpful error that you cannot do this.
Assess if this should be an error on .Build() instead of during a test run.