stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.75k stars 176 forks source link

fix: Refactor C# mutation orchestration to a simpler design #2831

Closed dupdob closed 4 months ago

dupdob commented 5 months ago

Redesigned MutationStore and MutationContext classes to a simpler and more consistent design.

Redesigned function/method/accessor/lambda orchestrator via a common parent class. Removed all xxxExpressionToBodyEngine classes.

Fixed following (non reported) bugs: 1) LocalFunction orchestrator may generate invalid local functions by adding erroneous return to void method (can be seen in the old unit test 🤦 ) 2) Improved return default injection policy. Those are injected only when:

Many classes and lines of code have been removed, and hundreds of documentation lines have been added.

I must say I am quite happy with this one, borderline on proud. 😆

EDIT: obviously the associated documentation refers to this design and not the existing one

dupdob commented 5 months ago

@JAKeijzer96 : many thanks for the amazing editorial work here!!. Btw, this document applies to the version in this PR. My initial objective was to write this doc, but I realized the design needed rework when writing it. Simple rule is: if it is hard to document, it can not stay as is.

dupdob commented 4 months ago

@richardwerkman : your feedback is most welcomed. And thanks for the taking the time to read all this. This PR is probably no picnic to review

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
91.4% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud