Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mnhock authored and mnhock committed Jun 14, 2024
1 parent afa0e3e commit baa5a7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void check(JavaClass javaClass, ConditionEvents events) {
boolean hasEquals = javaClass.getMethods().stream()
.anyMatch(method -> "equals".equals(method.getName()) &&
method.getRawParameterTypes().size() == 1 &&
method.getRawParameterTypes().get(0).getName().equals(Object.class.getName()));
method.getRawParameterTypes().getFirst().getName().equals(Object.class.getName()));

boolean hasHashCode = javaClass.getMethods().stream()
.anyMatch(method -> "hashCode".equals(method.getName()) &&
Expand Down
9 changes: 4 additions & 5 deletions src/test/java/com/enofex/taikai/TaikaiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void shouldConfigureSpringCustomizer() {
void shouldConfigureTestCustomizer() {
Customizer<TestConfigurer> customizer = mock(Customizer.class);

Taikai taikai = Taikai.builder()
Taikai.builder()
.namespace(VALID_NAMESPACE)
.test(customizer)
.build();
Expand All @@ -121,12 +121,11 @@ void shouldThrowExceptionForNullCustomizer() {
void shouldCheckRules() {
TaikaiRule mockRule = mock(TaikaiRule.class);

Taikai taikai = Taikai.builder()
Taikai.builder()
.namespace(VALID_NAMESPACE)
.addRule(mockRule)
.build();

taikai.check();
.build()
.check();

verify(mockRule, times(1)).check(VALID_NAMESPACE);
}
Expand Down

0 comments on commit baa5a7f

Please sign in to comment.