IntelliTect / IntelliTect/TestTools.TestFramework

Test (and possibly fix/add error messaging around) conflicting dependencies and multiple constructors

Open
#94 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.