Search in sources :

Example 16 with ActionResponse

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

the class BundledSetClockConfigurationSteps method theBundleResponseShouldContainASetClockConfigurationResponse.

@Then("^the bundle response should contain a set clock configuration response with values$")
public void theBundleResponseShouldContainASetClockConfigurationResponse(final Map<String, String> settings) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").isTrue();
    assertThat(response.getResult()).isEqualTo(OsgpResultType.fromValue(settings.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 17 with ActionResponse

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

the class BundledSetSpecialDaysSteps method theBundleResponseShouldContainASetSpecialDaysResponse.

@Then("^the bundle response should contain a set special days response with values$")
public void theBundleResponseShouldContainASetSpecialDaysResponse(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 18 with ActionResponse

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

the class BundledSetAlarmNotificationsSteps method theBundleResponseShouldContainASetAlarmNotificationsResponse.

@Then("^the bundle response should contain a set alarm notifications response with values$")
public void theBundleResponseShouldContainASetAlarmNotificationsResponse(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 19 with ActionResponse

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

the class BundledSetConfigurationObjectSteps method theBundleResponseShouldContainASetConfigurationObjectResponse.

@Then("^the bundle response should contain a set configuration object response$")
public void theBundleResponseShouldContainASetConfigurationObjectResponse() throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").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 20 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$")
public void theBundleResponseShouldContainAGetAllAttributeValuesResponse() throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof ActionResponse).as("Not a valid response").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)

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