IntelliTect / IntelliTect/TestTools.TestFramework

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

Aperta
#94 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
1
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.