Scrutor icon indicating copy to clipboard operation
Scrutor copied to clipboard

Latest version causes a fixture error

Open sahar2550 opened this issue 3 years ago • 1 comments

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.

sahar2550 avatar Sep 12 '22 13:09 sahar2550

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?

khellang avatar Sep 13 '22 12:09 khellang