Skip to content

Commit

Permalink
Use isPrivate
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Apr 12, 2024
1 parent a95df78 commit 985359e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
package org.assertj.core.api;

import static java.lang.Class.forName;
import static java.lang.reflect.Modifier.isPrivate;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import static org.assertj.core.api.BDDAssertions.from;
Expand Down Expand Up @@ -261,14 +260,13 @@ class SyntheticParameterizedTypeTest {

@Test
void should_be_private() {
// WHEN
int modifiers = underTest.getModifiers();
// THEN
then(isPrivate(modifiers)).isTrue();
// WHEN/THEN
assertThat(underTest).isPrivate();
}

@Test
void should_honor_equals_contract() {
// WHEN/THEN
EqualsVerifier.forClass(underTest)
.withNonnullFields("rawClass", "typeArguments")
.verify();
Expand Down

0 comments on commit 985359e

Please sign in to comment.