Skip to content
Snippets Groups Projects

Remove deprecated test RestAssuredTemplates class, move test case class

5 files
+ 164
374
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -15,7 +15,7 @@ import java.util.Optional;
import javax.ws.rs.core.Response.Status;
import org.eclipsefoundation.testing.templates.RestAssuredTemplates.EndpointTestCase;
import org.eclipsefoundation.testing.models.EndpointTestCase;
import io.restassured.http.ContentType;
@@ -113,27 +113,6 @@ public class TestCaseHelper {
.build();
}
/**
* Creates a EndpointTestCase object with the desired path, params, and request format. Used to test an invalid request
* body format. Status code 500 (Internal Error) is assumed.
*
* @param path the endpoint URL
* @param params the request path/query parameters
* @param invalidFormat the invalid request format
* @return the desired endpoint test case
* @deprecated Will be replaced by {@link this#buildInvalidRequestFormatCase(String, String[], ContentType)}
*/
@Deprecated(forRemoval = true)
public static EndpointTestCase buildInvalidFormatCase(String path, String[] params, ContentType invalidFormat) {
return EndpointTestCase
.builder()
.setPath(path)
.setParams(Optional.of(params))
.setRequestContentType(invalidFormat)
.setStatusCode(Status.INTERNAL_SERVER_ERROR.getStatusCode())
.build();
}
/**
* Creates a EndpointTestCase object with the desired path, params, and request format. Used to test an invalid response
* body format. Status code 406 (Not Acceptable) is assumed. While this test case isn't very meaningful when the
Loading