Skip to content

Commit

Permalink
add variant class to compliance tests (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla committed Apr 18, 2024
1 parent ddc8660 commit 72dcc94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
@@ -0,0 +1,4 @@
package com.twilio.rest.numbers.v1;

public class PortingPortInPhoneNumber {
}
7 changes: 5 additions & 2 deletions src/test/java/com/twilio/compliance/ComplianceTest.java
Expand Up @@ -48,6 +48,7 @@ public void setUp() {
assertTrue(twilioClasses.size() > 0);
assertTrue(resourceClasses.size() > 1);
variantClasses.add(com.twilio.rest.voice.v1.ArchivedCall.class);
variantClasses.add(com.twilio.rest.numbers.v1.PortingPortInPhoneNumber.class);
}

@Test
Expand Down Expand Up @@ -82,8 +83,10 @@ public void resourceClassSanityCheck() {

GivenClasses filteredClasses = (GivenClasses) classes().that(areNotInVariantList());
GivenClassesConjunction resourceClasses = filteredClasses.that().areAssignableTo(Resource.class).and()
.doNotHaveFullyQualifiedName(Resource.class.getName()).and().
doNotBelongToAnyOf(variantClasses.get(0));
.doNotHaveFullyQualifiedName(Resource.class.getName());
for (Class<?> variantClass : variantClasses) {
resourceClasses = resourceClasses.and().doNotBelongToAnyOf(variantClass);
}

resourceClasses.should()
.beAnnotatedWith(com.fasterxml.jackson.annotation.JsonIgnoreProperties.class)
Expand Down

0 comments on commit 72dcc94

Please sign in to comment.