Skip to content

IntroductionToScrutorInDotNet: retarget net10.0, bump Scrutor to 7.0.0, add pitfalls tests - #2100

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/92207-scrutor
Open

IntroductionToScrutorInDotNet: retarget net10.0, bump Scrutor to 7.0.0, add pitfalls tests#2100
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/92207-scrutor

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets the Scrutor sample to net10.0 and bumps packages to current versions (Scrutor 7.0.0, ASP.NET Core 10.0.11 test/OpenApi, Swashbuckle 10.2.3, xunit 2.9.3, Test.Sdk 18.9.0, coverlet 10.0.1).

Scrutor 7.0.0 removed FromCallingAssembly(), so both scans in Program.cs now use FromAssembliesOf(typeof(Program)).

Adds ScrutorPitfallsTests covering the behaviors the article documents: duplicate-scan append, RegistrationStrategy.Skip dedup, default transient lifetime, DecorationException when decorating an unregistered service, and open-generic decoration of the scanned repository.

Build -c Release and dotnet test are green on net10.0 (8 tests).

…0, add pitfalls tests

Scrutor 7.0.0 removed FromCallingAssembly(); switch both scans to
FromAssembliesOf(typeof(Program)). Bump all packages to current versions.
Add ScrutorPitfallsTests covering duplicate-scan append, RegistrationStrategy.Skip,
default transient lifetime, DecorationException on unregistered decorate, and
open-generic decoration of the scanned repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant