Search in sources :

Example 1 with Response

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

the class BundledSetAdministrativeStatusSteps method theBundleResponseShouldContainASetAdministrativeStatusResponse.

@Then("^the bundle response should contain a set administrative status response$")
public void theBundleResponseShouldContainASetAdministrativeStatusResponse() 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 2 with Response

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

the class BundledSetPushSetupAlarmSteps method theBundleResponseShouldContainASetPushSetupAlarmResponse.

@Then("^the bundle response should contain a set push setup alarm response with values$")
public void theBundleResponseShouldContainASetPushSetupAlarmResponse(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 3 with Response

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

the class BundledSetPushSetupAlarmSteps method theBundleResponseShouldContainASetPushSetupAlarmResponse.

@Then("^the bundle response should contain a set push setup alarm response$")
public void theBundleResponseShouldContainASetPushSetupAlarmResponse() 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 4 with Response

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

the class BundledSetSpecialDaysSteps method theBundleResponseShouldContainASetSpecialDaysResponse.

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

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

the class BundleSteps method theBundleResponseShouldBeOK.

@Then("the bundle response should be OK")
public void theBundleResponseShouldBeOK() throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response).isInstanceOf(ActionResponse.class);
    assertThat(response.getResult()).isEqualTo(OsgpResultType.OK);
}
Also used : BundleAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleAsyncResponse) ActualMeterReadsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActualMeterReadsResponse) GetConfigurationObjectResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse) BundleResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleResponse) ReadAlarmRegisterResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ReadAlarmRegisterResponse) GetMbusEncryptionKeyStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse) ActionResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse) ScanMbusChannelsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ScanMbusChannelsResponse) AdministrativeStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AdministrativeStatusResponse) AssociationLnObjectsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AssociationLnObjectsResponse) FindEventsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FindEventsResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) FaultResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FaultResponse) Then(io.cucumber.java.en.Then)

Aggregations

Response (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response)44 Then (io.cucumber.java.en.Then)42 ActionResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse)26 ActualMeterReadsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActualMeterReadsResponse)5 AdministrativeStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AdministrativeStatusResponse)5 AssociationLnObjectsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AssociationLnObjectsResponse)5 FindEventsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FindEventsResponse)5 GetConfigurationObjectResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse)5 GetMbusEncryptionKeyStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse)5 ReadAlarmRegisterResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ReadAlarmRegisterResponse)5 ScanMbusChannelsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ScanMbusChannelsResponse)5 BundleResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleResponse)4 BundleAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleAsyncResponse)3 FaultResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FaultResponse)3 GetFirmwareVersionGasResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetFirmwareVersionGasResponse)3 GetFirmwareVersionResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetFirmwareVersionResponse)3 DecoupleMbusDeviceByChannelResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.DecoupleMbusDeviceByChannelResponse)2 GetGsmDiagnosticResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetGsmDiagnosticResponse)2 GetOutagesResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetOutagesResponse)2 Given (io.cucumber.java.en.Given)1