Skip to content

Commit

Permalink
Replaced JUnit Juypiter Assert with JUnit Assert
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlasov committed Jul 29, 2024
1 parent 15acc2e commit 2c16247
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/test/java/picocli/IAnnotatedElementProviderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
package picocli;

import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.lang.reflect.Field;

import org.junit.After;
Expand Down Expand Up @@ -50,14 +47,14 @@ public void testFieldAccess() throws Exception {
CommandLine commandLine = new CommandLine(command);
CommandSpec spec = commandLine.getCommandSpec();
for (OptionSpec option: spec.options()) {
assertTrue(option.setter() instanceof IAnnotatedElementProvider);
assertTrue(option.getter() instanceof IAnnotatedElementProvider);
org.junit.Assert.assertTrue(option.setter() instanceof IAnnotatedElementProvider);
org.junit.Assert.assertTrue(option.getter() instanceof IAnnotatedElementProvider);

assertTrue(((IAnnotatedElementProvider) option.setter()).getAnnotatedElement() instanceof Field);
assertTrue(((IAnnotatedElementProvider) option.getter()).getAnnotatedElement() instanceof Field);
org.junit.Assert.assertTrue(((IAnnotatedElementProvider) option.setter()).getAnnotatedElement() instanceof Field);
org.junit.Assert.assertTrue(((IAnnotatedElementProvider) option.getter()).getAnnotatedElement() instanceof Field);

assertEquals(IAnnotatedElementProviderTestCommand.class, ((Field) ((IAnnotatedElementProvider) option.setter()).getAnnotatedElement()).getDeclaringClass());
assertEquals(IAnnotatedElementProviderTestCommand.class, ((Field) ((IAnnotatedElementProvider) option.getter()).getAnnotatedElement()).getDeclaringClass());
org.junit.Assert.assertEquals(IAnnotatedElementProviderTestCommand.class, ((Field) ((IAnnotatedElementProvider) option.setter()).getAnnotatedElement()).getDeclaringClass());
org.junit.Assert.assertEquals(IAnnotatedElementProviderTestCommand.class, ((Field) ((IAnnotatedElementProvider) option.getter()).getAnnotatedElement()).getDeclaringClass());
}
}

Expand Down

0 comments on commit 2c16247

Please sign in to comment.