diff --git a/e2e-tests/spring-rest-openapi-v2/src/test/java/org/evomaster/e2etests/spring/examples/endpointFocusAndPrefix/EndpointFocusAndPrefixTest.java b/e2e-tests/spring-rest-openapi-v2/src/test/java/org/evomaster/e2etests/spring/examples/endpointFocusAndPrefix/EndpointFocusAndPrefixTest.java index 9126fb0a63..affe4b2ef1 100644 --- a/e2e-tests/spring-rest-openapi-v2/src/test/java/org/evomaster/e2etests/spring/examples/endpointFocusAndPrefix/EndpointFocusAndPrefixTest.java +++ b/e2e-tests/spring-rest-openapi-v2/src/test/java/org/evomaster/e2etests/spring/examples/endpointFocusAndPrefix/EndpointFocusAndPrefixTest.java @@ -28,9 +28,7 @@ public class EndpointFocusAndPrefixTest extends SpringTestBase { /* */ public static void initClass() throws Exception { - SpringTestBase.initClass(new EndpointFocusAndPrefixController()); - } @Test @@ -41,7 +39,7 @@ public void testRunBlackboxWithoutFocusOrPrefix() { List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithoutFocusOrPrefix"), + ClassName.get("org.foo.BlackboxWithoutFocusOrPrefix"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -73,7 +71,7 @@ public void testAllPathsInTestWhenFocusOrPrefixNotProvided() { List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithoutFocusOrPrefixAllPaths"), + ClassName.get("org.foo.AllPathsInTestWhenFocusOrPrefixNotProvided"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -130,13 +128,12 @@ else if (currentPathItem.getDelete() != null) { public void testRunBlackboxWithFocusWithoutParameters() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointFocus = "/api/pet"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithNonParametrizedFocus"), + ClassName.get("org.foo.BlackboxWithFocusWithoutParameters"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -148,7 +145,6 @@ public void testRunBlackboxWithFocusWithoutParameters() { args.add("--endpointFocus"); args.add(endpointFocus); - // no endpointFocus or endpointPrefix is provided Solution solution = initAndRun(args); @@ -169,13 +165,12 @@ public void testRunBlackboxWithFocusWithoutParameters() { public void testRunBlackboxWithFocusWithParameters() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointFocus = "/api/pet/{petId}"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedFocus"), + ClassName.get("org.foo.BlackboxWithFocusWithParameters"), true); // program arguments for EvoMaster @@ -207,13 +202,12 @@ public void testRunBlackboxWithFocusWithParameters() { public void testRunBlackboxWithFocusOneEndpoint() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointFocus = "/api/store/inventory"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.InvalidFocusValidPrefix"), + ClassName.get("org.foo.BlackboxWithFocusOneEndpoint"), true); // program arguments for EvoMaster @@ -245,13 +239,12 @@ public void testRunBlackboxWithFocusOneEndpoint() { public void testRunBlackboxWithPrefixWithoutParameters() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointPrefix = "/api/user"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithNonParametrizedPrefix"), + ClassName.get("org.foo.BlackboxWithPrefixWithoutParameters"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -282,13 +275,12 @@ public void testRunBlackboxWithPrefixWithoutParameters() { public void testRunBlackboxWithPrefixWithParameters() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointPrefix = "/api/pet/{petId}"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxWithPrefixWithParameters"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -325,7 +317,7 @@ public void testRunBlackboxFocusNonExistingFocusValidPrefix() { List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxFocusNonExistingFocusValidPrefix"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -356,7 +348,7 @@ public void testRunBlackboxPrefixNonExistingFocusValidPrefix() { List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxPrefixNonExistingFocusValidPrefix"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -388,13 +380,12 @@ public void testRunBlackboxPrefixNonExistingFocusValidPrefix() { public void testRunBlackboxNonExistingFocusNonExistingPrefix() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointPrefix = "/api/ab/s1"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxNonExistingFocusNonExistingPrefix"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -408,21 +399,18 @@ public void testRunBlackboxNonExistingFocusNonExistingPrefix() { // check for IllegalArgumentException assertThrows(IllegalArgumentException.class, () -> initAndRun(args)); - } - @Test public void testRunBlackboxPrefixNonExistingPrefix() { String outputFolder = "EndPointFocusAndPrefix"; - String endpointPrefix = "/api/store/inventory/in"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxPrefixNonExistingPrefix"), true); // program arguments for EvoMaster args.add("--blackBox"); @@ -443,13 +431,12 @@ public void testRunBlackboxPrefixNonExistingPrefix() { public void testRunBlackboxBothFocusAndPrefix() { String outputFolder = "EndPointFocusAndPrefix"; - String endpoint = "/api/store/order"; List args = getArgsWithCompilation( 40, outputFolder, - ClassName.get("org.foo.WithParametrizedPrefix"), + ClassName.get("org.foo.BlackboxBothFocusAndPrefix"), true); // program arguments for EvoMaster