IntelliTect / IntelliTect/TestTools.TestFramework
Test (and possibly fix/add error messaging around) conflicting dependencies and multiple constructors
- Vorherrschende Sprache
- C#
- Sterne
- 1
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Start by tracing TestBuilder.AddDependencyInstance and the Build path, using the conflicting int and string constructor example as the reproducer. Add tests covering multiple constructors and conflicting dependency instances, then verify the behavior produces a helpful error at the agreed stage rather than failing silently.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 38/100