I am getting the following error when I am trying to execute a simple Unit Test using XUnit.
The following constructor parameters did not have matching fixture data: IMyRepository myRepo
Scenario: When I supplied with the name of a student, I am checking if the student school is correct.] Code
public class UnitTest1
{
private readonly IMyRepository _myRepo;
public UnitTest1(IMyRepository myRepo)
{
this._myRepo = myRepo;
}
[Fact]
public void TestOne()
{
var name = "Hillary";
var r = this._myRepo.FindName(name);
Assert.True(r.School == "Capital Hill School");
}
}
IMyRepository? See xunit.net/docs/shared-context for example. If so, please provide the code for the fixture.