From 18852e1dc31e8b8f9e07531785c3b32f1963f023 Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Mon, 7 Feb 2022 10:59:24 +0200 Subject: [PATCH] PR#57 Describe TestFixtures in more detail and give an alternative --- codekata/core.again.instructionset.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codekata/core.again.instructionset.md b/codekata/core.again.instructionset.md index 0275353..debe86b 100644 --- a/codekata/core.again.instructionset.md +++ b/codekata/core.again.instructionset.md @@ -134,6 +134,9 @@ That's because of [java-test-fixtures](https://docs.gradle.org/current/userguide Check out the build.gradle's to see how that's done. This can be useful to share some static Test Data, or extensions in our case. +> Test Fixtrues creates a new sourceset between the production code and the test code. test depends on testFixtures and testFixtures depends on source. So test sees everything in testFixtures and other modules can also use testFixtures. This way we can share extensions or other helper classes. +> An alternative to use test code between modules instead of TestFixtures is to use a separate module, like the :mockserver defined in the project. + So let's add this extension: ```kotlin @RegisterExtension