0
I am getting the following error in my application Xunit
, when using dependency injection:
Message: The following constructor Parameters Did not have matching fixture data:Icompetitionservice competitionManager
My builder where I create the injection:
private readonly CampeonatosController _campeonato;
private readonly ICompetitionService _competitionManager;
public CampeonatoTest(
ICompetitionService competitionManager)
{
_competitionManager = competitionManager;
_campeonato = new CampeonatosController(_competitionManager);
}
this code does not say much, need to see where you registered the dependency of
ICompetitionService
, if it is a class that actually implements the interface– Ricardo Pontual
Yes this is correct, it implements correctly.
– Matheus
So can you put your test code in here? as I said, this code doesn’t say much, you need to see the code that makes the injection and the test, if the mock is correct
– Ricardo Pontual