Skip to content

Commit

Permalink
GH-262 - Mention necessary imports for the ArchUnit integration in re…
Browse files Browse the repository at this point in the history
…adme.
  • Loading branch information
odrotbohm committed Sep 30, 2024
1 parent 1d7ed8f commit 98bb794
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion jmolecules-archunit/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This module contains https://www.archunit.org/[ArchUnit] rules to verify the integrity of domain concepts expressed via https://github.com/xmolecules/jmolecules#expressing-ddd-concepts[jMolecules DDD annotations or types].

To use these rules, declare the following artifact as dependency of your project:
To use these rules, declare the following artifact as dependencies of your project:

.Maven dependency
[source,xml]
Expand All @@ -11,13 +11,28 @@ To use these rules, declare the following artifact as dependency of your project
<groupId>org.jmolecules.integrations</groupId>
<artifactId>jmolecules-archunit</artifactId>
<version>${jmolecules-integrations.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
</dependency>
----

The provided rules can then be used in a JUnit test as follows:

[source, java, tabsize="2"]
----
import static org.assertj.core.api.Assertions.*;
import com.tngtech.archunit.core.domain.*;
import com.tngtech.archunit.junit.*;
import com.tngtech.archunit.lang.*;
import org.jmolecules.archunit.*;
@AnalyzeClasses(packages = "example") // <1>
class JMoleculesRulesUnitTest {
Expand Down

0 comments on commit 98bb794

Please sign in to comment.