diff --git a/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslObjectTest.java b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslObjectTest.java index a3cfb75b5..f32ef6c88 100644 --- a/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslObjectTest.java +++ b/baremaps-rpsl/src/test/java/org/apache/baremaps/rpsl/RpslObjectTest.java @@ -22,9 +22,13 @@ import java.io.IOException; import java.nio.file.Files; import java.util.List; +import java.util.stream.Stream; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; class RpslObjectTest { @@ -38,11 +42,17 @@ public void before() throws IOException { } } - @Test - void type() { - assertEquals("inetnum", objects.get(0).type()); - assertEquals("organisation", objects.get(8).type()); - assertEquals("inet6num", objects.get(9).type()); + @ParameterizedTest + @MethodSource("typeProvider") + void testType(int index, String expectedType) { + assertEquals(expectedType, objects.get(index).type()); + } + + private static Stream typeProvider() { + return Stream.of( + Arguments.of(0, "inetnum"), + Arguments.of(8, "organisation"), + Arguments.of(9, "inet6num")); } @Test