dependencies {
- testCompile 'com.tngtech.archunit:archunit-junit4:0.10.0'
+ testCompile 'com.tngtech.archunit:archunit-junit4:0.10.1'
}
diff --git a/README.md b/README.md
index 222fc16418..3ae92386cc 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ framework.
###### Gradle
```
-testCompile 'com.tngtech.archunit:archunit:0.10.0'
+testCompile 'com.tngtech.archunit:archunit:0.10.1'
```
###### Maven
@@ -26,7 +26,7 @@ testCompile 'com.tngtech.archunit:archunit:0.10.0'
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit4</artifactId>
- <version>0.10.0</version>
+ <version>0.10.1</version>
<scope>test</scope>
</dependency>
@@ -618,7 +618,7 @@ dependencies {
- testCompile 'com.tngtech.archunit:archunit-junit4:0.10.0'
+ testCompile 'com.tngtech.archunit:archunit-junit4:0.10.1'
}
dependencies {
...
- testCompile 'com.tngtech.archunit:archunit-junit5-api:0.10.0'
- testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.10.0'
+ testCompile 'com.tngtech.archunit:archunit-junit5-api:0.10.1'
+ testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.10.1'
}
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
- <version>0.10.0</version>
+ <version>0.10.1</version>
<scope>test</scope>
</dependency>
@@ -712,7 +712,7 @@ dependencies {
- testCompile 'com.tngtech.archunit:archunit:0.10.0'
+ testCompile 'com.tngtech.archunit:archunit:0.10.1'
}
ClassesTransformer<JavaField> fields = new AbstractClassesTransformer<JavaField>("fields") {
+ClassesTransformer<JavaPackage> packages = new AbstractClassesTransformer<JavaPackage>("packages") {
@Override
- public Iterable<JavaField> doTransform(JavaClasses classes) {
- Set<JavaField> result = new HashSet<>();
- for (JavaClass javaClass : classes) {
- result.addAll(javaClass.getFields());
- }
+ public Iterable<JavaPackage> doTransform(JavaClasses classes) {
+ Set<JavaPackage> result = new HashSet<>();
+ classes.getDefaultPackage().accept(alwaysTrue(), new PackageVisitor() {
+ @Override
+ public void visit(JavaPackage javaPackage) {
+ result.add(javaPackage);
+ }
+ });
return result;
}
};
-all(fields).that(have(modifier(PUBLIC))).should(...)
+all(packages).that(containACoreClass()).should(...);