Search in sources :

Example 11 with ActionResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse in project open-smart-grid-platform by OSGP.

the class BundledSetActivityCalendarSteps method theBundleResponseShouldContainASetActivityCalendarResponse.

@Then("^the bundle response should contain a set activity calendar response with values$")
public void theBundleResponseShouldContainASetActivityCalendarResponse(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT));
}
Also used : ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Then(io.cucumber.java.en.Then)

Example 12 with ActionResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse in project open-smart-grid-platform by OSGP.

the class BundledGetAllAttributeValuesSteps method theBundleResponseShouldContainAGetAllAttributeValuesResponse.

@Then("^the bundle response should contain a get all attribute values response with values$")
public void theBundleResponseShouldContainAGetAllAttributeValuesResponse(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT));
    assertThat(StringUtils.isNotBlank(response.getResultString())).as("Result contains no data.").isTrue();
}
Also used : ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Then(io.cucumber.java.en.Then)

Example 13 with ActionResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse in project open-smart-grid-platform by OSGP.

the class BundledReplaceKeySteps method theBundleResponseShouldContainAGenerateReplaceKeysResponseWithValues.

@Then("the bundle response should contain a generate replace keys response with values")
public void theBundleResponseShouldContainAGenerateReplaceKeysResponseWithValues(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT));
    assertThat(response.getResultString()).as("ResultString is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT_STRING));
}
Also used : ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Then(io.cucumber.java.en.Then)

Example 14 with ActionResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse in project open-smart-grid-platform by OSGP.

the class BundledReplaceKeySteps method theBundleResponseShouldContainAReplaceKeysResponse.

@Then("^the bundle response should contain a replace keys response with values$")
public void theBundleResponseShouldContainAReplaceKeysResponse(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT));
    assertThat(response.getResultString()).as("ResultString is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT_STRING));
}
Also used : ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Then(io.cucumber.java.en.Then)

Example 15 with ActionResponse

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse in project open-smart-grid-platform by OSGP.

the class BundledSetAdministrativeStatusSteps method theBundleResponseShouldContainASetAdministrativeStatusResponse.

@Then("^the bundle response should contain a set administrative status response with values$")
public void theBundleResponseShouldContainASetAdministrativeStatusResponse(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult().name()).as("Result is not as expected.").isEqualTo(values.get(PlatformSmartmeteringKeys.RESULT));
}
Also used : ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)20 ActionResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse)20 Response (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response)20 ScanMbusChannelsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ScanMbusChannelsResponse)1