(332) 331-8677

xUnit - The following constructor parameters did not have matching fixture data

Wrong code

private readonly TriangleCalc _triangleCalc;
private readonly CircleCalc _circleCalc;

public UnitTestMy(TriangleCalc triangleCalc, CircleCalc circleCalc)
{
    _triangleCalc = triangleCalc;
    _circleCalc = circleCalc;
}

Correct code

private readonly TriangleCalc _triangleCalc;
private readonly CircleCalc _circleCalc;

public UnitTestMy()
{
    _triangleCalc = new TriangleCalc();
    _circleCalc = new CircleCalc();
}