Skip to content

Commit fbda625

Browse files
authored
Update README.md (#5)
1 parent e87b854 commit fbda625

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ testImplementation 'org.contextmapper:context-mapper-archunit-extension:1.0.0'
2323
</dependency>
2424
```
2525

26+
### JavaDoc
27+
Besides the code example below, you can find the complete JavaDoc of the libraries API [here](https://www.javadoc.io/doc/org.contextmapper/context-mapper-archunit-extension/latest/index.html).
28+
2629
### Use all our test cases
2730
The simplest way to apply all our test predefined test cases is to extend our `AbstractTacticArchUnitTest`. An example:
2831

@@ -89,6 +92,8 @@ public class ExampleArchitectureTest {
8992

9093
The three example tests above ensure that Aggregates, Entities, and Value Objects that exist in the Java code, also exist in the CML model. In case a developer adds an Aggregate, Entity, or Value Object to the code that is not part of the CML model, the test will fail.
9194

95+
The example above uses our predefined rules based on the jMolecules annotations. You can find all available rules [here](https://www.javadoc.io/doc/org.contextmapper/context-mapper-archunit-extension/latest/org/contextmapper/archunit/ContextMapperJMoleculesArchRules.html). The next section shows how you can write your own rules, in case you don't want to use jMolecules.
96+
9297
### Use custom annotations
9398
By using only our ArchCondition's it is also possible to implement the tests with other annotations than JMolecules:
9499

@@ -125,9 +130,11 @@ public class ExampleArchitectureTest {
125130
}
126131
```
127132

133+
As the example illustrates, in this case you are able to select your classes with your own code (using your own annotations); but you can still use our conditions, that check specific things in the CML model. You can find all conditions that are currently available [here](https://www.javadoc.io/doc/org.contextmapper/context-mapper-archunit-extension/latest/org/contextmapper/archunit/ContextMapperArchConditions.html).
134+
128135
## Available Rules and Conditions
129136
_Hint:_ The available rules are implemented with the jMolecules DDD annotations. However, you can implement the same rules with your
130-
own set of annotations or interfaces by using the corresponding ArchUnit conditions.
137+
own set of annotations or interfaces by using the corresponding ArchUnit conditions (as documented above).
131138

132139
| Rule / Condition | Description |
133140
|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -143,6 +150,8 @@ own set of annotations or interfaces by using the corresponding ArchUnit conditi
143150
| `valueObjectsShouldAdhereToCmlValueObjectStructure` | This rule ensures that the fields of a value object in the code (for example annotated with @ValueObject jMolecules annotation) are also modeled in the corresponding CML value object. |
144151
| `domainEventsShouldAdhereToCmlDomainEventStructure` | This rule ensures that the fields of a domain event in the code (for example annotated with @DomainEvent jMolecules annotation) are also modeled in the corresponding CML domain event. |
145152

153+
The rules and conditions are documented in [our JavaDoc](https://www.javadoc.io/doc/org.contextmapper/context-mapper-archunit-extension/latest/index.html) as well.
154+
146155
**Missing some rules/conditions?** Contributions are always welcome! Create PRs or GitHub issues with your ideas/requirements.
147156

148157
## Contributing

0 commit comments

Comments
 (0)