FINERACT-822 Enable StaticAssignmentInConstructor check
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
5a16d19564
commit
1102d5b58a
@@ -32,14 +32,16 @@ import io.restassured.specification.ResponseSpecification;
|
||||
*/
|
||||
public class RestAssuredFixture {
|
||||
|
||||
private final int httpPort = 8443;
|
||||
private final int httpPort;
|
||||
|
||||
private ResponseSpecification responseSpec;
|
||||
private RequestSpecification requestSpec;
|
||||
|
||||
public RestAssuredFixture() {
|
||||
public RestAssuredFixture(int http) {
|
||||
super();
|
||||
this.httpPort = http;
|
||||
Utils.initializeRESTAssured();
|
||||
Utils.initializeRESTAssuredPort(http);
|
||||
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
|
||||
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
|
||||
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
|
||||
|
||||
@@ -53,6 +53,10 @@ public class Utils {
|
||||
RestAssured.useRelaxedHTTPSValidation();
|
||||
}
|
||||
|
||||
public static void initializeRESTAssuredPort(int http) {
|
||||
RestAssured.port = http;
|
||||
}
|
||||
|
||||
public static String loginIntoServerAndGetBase64EncodedAuthenticationKey() {
|
||||
try {
|
||||
LOG.info("-----------------------------------LOGIN-----------------------------------------");
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class SpringBootServerLoginTest extends AbstractSpringBootWithMariaDB4jIn
|
||||
@Test
|
||||
@Disabled("Failing on Cloubees")
|
||||
public void hasPlatformStarted() {
|
||||
util = new RestAssuredFixture();
|
||||
util = new RestAssuredFixture(8443);
|
||||
List<Map<String, String>> response = util.httpGet("/users");
|
||||
assertThat(response.get(0).get("username"), is("mifos"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user