http4s-munit icon indicating copy to clipboard operation
http4s-munit copied to clipboard

BREAKING | Simplify classes

Open alejandrohdezma opened this issue 1 year ago • 0 comments

💻 How to review this PR?

This PR was created with the idea of being reviewed commit by commit. Each commit contains an incremental change that makes it easier to review. Also some of the commits contain additional information in their description to help understand why the change was made.

I also recommend checking "Hide whitespace" when reviewing this PR!

🚀 What's included in this PR?

📦 Use attributes for storing auth context on AuthedRoutesSuite

Instead of having to parametrize everything with ContextRequest. Although this change is in fact a breaking change, it shouldn't have much effect on most codebases, since adding the context has been implemented into the Request#context extend method.

🔥 Simplify hierarchy

The type parameter in Http4sSuite has been removed, since we can just use Request everywhere. This also allows to directly implement http4sMUnitNameCreator, test and http4sMUnitFunFixture at the top level.

New methods have been created for providing the fixture running the tests, as well as a new class representing test-names creator.

The Http4sMUnitTestCreator has been extracted to its own class.

alejandrohdezma avatar Apr 25 '23 07:04 alejandrohdezma