import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; public class SimpleTest { private static EersteDubbel dubbel; @BeforeAll public static void init() { dubbel = new MijnEersteDubbel(); } @Test public void test() { Assertions.assertEquals(3, dubbel.eersteDubbel(new int[] {1, 3, 5, 5, 8, 3, 2, 5, 8, 3})); } @Test public void test2() { Assertions.assertEquals(3, dubbel.eersteDubbel(new int[] {1, 3, 5, 5, 8, 6, 2, 5, 8, 3})); } @Test public void testGrootGetal() { Assertions.assertEquals(4, dubbel.eersteDubbel(new int[] {208412, 4, 9, 7, 6, 5, 4, 8, 1, 87})); } @Test public void testGeenOpl() { Assertions.assertEquals(-1, dubbel.eersteDubbel(new int[] {369874, 4, 9, 7, 6, 5, 18, 8, 1, 87})); } @Test public void testLeeg() { Assertions.assertEquals(-1, dubbel.eersteDubbel(new int[] {})); } }