/** * @return */ public RequestSpecification newRequest() { String hostname = serverConfiguration.getHost(); String scheme = serverConfiguration.getScheme(); // setup RestAssured.baseURI = String.format("%s://%s", scheme, hostname); RestAssured.port = serverConfiguration.getPort(); if (contextConfiguration != null) { RestAssured.basePath = contextConfiguration.getContextPath(); } else { RestAssured.basePath = ""; } RestAssured.defaultParser = Parser.JSON; RestAssured.config = this.restAssuredConfig; // create request spec: RequestSpecification specification = RestAssured.with(); log.info(String.format("LOG00300: Initialising RestEasy::RequestSpecification for %s:%d%s", RestAssured.baseURI, RestAssured.port, RestAssured.basePath)); RestAssured.reset(); // clear the parameters after the specification is created; return specification; }
/** * @return */ public RequestSpecification newRequest() { String hostname = serverConfiguration.getHost(); String scheme = serverConfiguration.getScheme(); // setup RestAssured.baseURI = String.format("%s://%s", scheme, hostname); RestAssured.port = serverConfiguration.getPort(); if (contextConfiguration != null) { RestAssured.basePath = contextConfiguration.getContextPath(); } else { RestAssured.basePath = ""; } RestAssured.defaultParser = Parser.JSON; RestAssured.config = this.restAssuredConfig; // create request spec: RequestSpecification specification = RestAssured.with(); log.info(String.format("LOG00300: Initialising RestEasy::RequestSpecification for %s:%d%s", RestAssured.baseURI, RestAssured.port, RestAssured.basePath)); RestAssured.reset(); // clear the parameters after the specification is created; return specification; }