6
6
package io .opentelemetry .all ;
7
7
8
8
import com .tngtech .archunit .base .DescribedPredicate ;
9
- import com .tngtech .archunit .base .Optional ;
10
- import com .tngtech .archunit .base .PackageMatcher ;
11
9
import com .tngtech .archunit .core .domain .JavaClass ;
12
10
import com .tngtech .archunit .core .domain .JavaClasses ;
13
11
import com .tngtech .archunit .core .domain .JavaMethod ;
12
+ import com .tngtech .archunit .core .domain .PackageMatcher ;
14
13
import com .tngtech .archunit .core .importer .ClassFileImporter ;
15
14
import com .tngtech .archunit .lang .syntax .ArchRuleDefinition ;
16
15
import com .tngtech .archunit .lang .syntax .elements .MethodsShouldConjunction ;
17
16
import java .util .ArrayList ;
18
17
import java .util .Arrays ;
19
18
import java .util .List ;
19
+ import java .util .Optional ;
20
20
import org .junit .jupiter .api .Test ;
21
21
22
22
class SdkDesignTest {
@@ -55,7 +55,7 @@ void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
55
55
static DescribedPredicate <? super JavaMethod > implementOrOverride () {
56
56
return new DescribedPredicate <JavaMethod >("implement or override a method" ) {
57
57
@ Override
58
- public boolean apply (JavaMethod input ) {
58
+ public boolean test (JavaMethod input ) {
59
59
List <JavaClass > params = input .getRawParameterTypes ();
60
60
Class <?>[] paramsType = new Class <?>[params .size ()];
61
61
for (int i = 0 , n = params .size (); i < n ; i ++) {
@@ -80,7 +80,7 @@ public boolean apply(JavaMethod input) {
80
80
static DescribedPredicate <? super JavaClass > inPackage (String ... requiredPackages ) {
81
81
return new DescribedPredicate <JavaClass >("are in " + Arrays .toString (requiredPackages )) {
82
82
@ Override
83
- public boolean apply (JavaClass member ) {
83
+ public boolean test (JavaClass member ) {
84
84
for (String requiredPackage : requiredPackages ) {
85
85
if (PackageMatcher .of (requiredPackage ).matches (member .getPackageName ())) {
86
86
return true ;
0 commit comments