IntroductionToScrutorInDotNet: retarget net10.0, bump Scrutor to 7.0.0, add pitfalls tests - #2100
Open
vladimir-pecanac-main wants to merge 1 commit into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inProgram.csnow useFromAssembliesOf(typeof(Program)).Adds
ScrutorPitfallsTestscovering the behaviors the article documents: duplicate-scan append,RegistrationStrategy.Skipdedup, default transient lifetime,DecorationExceptionwhen decorating an unregistered service, and open-generic decoration of the scanned repository.Build -c Release and
dotnet testare green on net10.0 (8 tests).