Scrutor
Scrutor copied to clipboard
Latest version causes a fixture error
I used Scrutor for decoration in an Asp.net core application and it worked fine with version 4.1.0. But after updating to 4.2.0, it causes some tests to fail.
container.TryDecorate<IX, X>();
container.AddCors(options =>
{
options.AddPolicy(name: Constants.X, builder => {
builder.AllowAnyOrigin()
.AllowAnyHeader()
.AllowAnyMethod()
.Build();
});
});
Message:
System.AggregateException : One or more errors occurred. (The method or operation is not implemented.) (The following constructor parameters did not have matching fixture data: xFixture fixture)
---- System.NotImplementedException : The method or operation is not implemented.
---- The following constructor parameters did not have matching fixture data: xFixture fixture
Any idea how that might happen? It works with downgrading.
Hey @sahar2550! 👋🏻
It's probably related to the DecoratedType introduced in 4.2.0.
I'm not sure how the attached code is related to the xFixture error message though 🤔 Do you have a complete repro?