Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(deps-dev): Bump com.tngtech.archunit:archunit from 0.23.1 to 1.1.0 #1695

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>0.23.1</version>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
14 changes: 9 additions & 5 deletions src/test/java/org/kohsuke/github/ArchTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
import java.lang.reflect.Field;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.stream.Collectors;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.tngtech.archunit.core.domain.JavaCall.Predicates.target;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAPackage;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.type;
import static com.tngtech.archunit.core.domain.JavaClass.namesOf;
import static com.tngtech.archunit.core.domain.properties.HasName.Predicates.name;
import static com.tngtech.archunit.core.domain.properties.HasName.Predicates.nameContaining;
import static com.tngtech.archunit.core.domain.properties.HasOwner.Predicates.With.owner;
Expand Down Expand Up @@ -61,7 +61,7 @@ public class ArchTests {
"preview has no required media types defined") {

@Override
public boolean apply(JavaAnnotation<?> javaAnnotation) {
public boolean test(JavaAnnotation<?> javaAnnotation) {
boolean isPreview = javaAnnotation.getRawType().isEquivalentTo(Preview.class);
Object[] values = (Object[]) javaAnnotation.getProperties().get("value");
return isPreview && values != null && values.length < 1;
Expand Down Expand Up @@ -194,7 +194,11 @@ public static DescribedPredicate<JavaCall<?>> targetMethodIs(Class<?> owner,
.and(JavaCall.Predicates.target(name(methodName)))
.and(JavaCall.Predicates.target(rawParameterTypes(parameterTypes)))
.as("method is %s",
Formatters.formatMethodSimple(owner.getSimpleName(), methodName, namesOf(parameterTypes)));
Formatters.formatMethodSimple(owner.getSimpleName(),
methodName,
Arrays.stream(parameterTypes)
.map(item -> item.getName())
.collect(Collectors.toList())));
}

/**
Expand Down Expand Up @@ -224,8 +228,8 @@ private static class UnlessPredicate<T> extends DescribedPredicate<T> {
}

@Override
public boolean apply(T input) {
return current.apply(input) && !other.apply(input);
public boolean test(T input) {
return current.test(input) && !other.test(input);
}
}
}