IntelliTect / IntelliTect/TestTools.TestFramework
Test (and possibly fix/add error messaging around) conflicting dependencies and multiple constructors
- Langage dominant
- C#
- Étoiles
- 1
- Forks
- 1
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- testing-qa
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 38/100