APISonar


com.consol.citrus.dsl.endpoint.CitrusEndpoints.http

> com > consol > citrus > dsl > endpoint > CitrusEndpoints > http
com APIs consol APIs citrus APIs dsl APIs endpoint APIs CitrusEndpoints APIs http APIs

Example 1
public GoogleSheetsApiTestServerRule(String optionFile) {
        try {
            Map<String, Object> testOptions = getTestOptions(optionFile);

            googleApiTestServer = new GoogleSheetsApiTestServer.Builder(CitrusEndpoints.http().server().port(serverPort).timeout(15000).defaultStatus(HttpStatus.REQUEST_TIMEOUT)
                .autoStart(true)).keyStorePath(new ClassPathResource(SERVER_KEYSTORE).getFile().toPath()).keyStorePassword(SERVER_KEYSTORE_PASSWORD).securePort(serverPort)
                    .clientId(testOptions.get("clientId").toString()).clientSecret(testOptions.get("clientSecret").toString())
                    .accessToken(testOptions.get("accessToken").toString()).refreshToken(testOptions.get("refreshToken").toString()).build();

            assertThatGoogleApi(googleApiTestServer).isRunning();
        } catch (Exception e) {
            throw new IllegalStateException("Error while reading server keystore file", e);
        }
    }