Search in sources :

Example 1 with FaultResponse

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

the class BundleSteps method theBundleResponseShouldBeAFaultResponseWithMessageContaining.

@Then("the bundle response should be a FaultResponse with message containing")
public void theBundleResponseShouldBeAFaultResponseWithMessageContaining(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response).isInstanceOf(FaultResponse.class);
    assertThat(response.getResult()).isEqualTo(OsgpResultType.NOT_OK);
    final FaultResponse faultResponse = (FaultResponse) response;
    assertThat(faultResponse.getMessage()).containsSubsequence(values.get(PlatformKeys.MESSAGE));
}
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) FaultResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FaultResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)1 ActionResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActionResponse)1 ActualMeterReadsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ActualMeterReadsResponse)1 AdministrativeStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AdministrativeStatusResponse)1 AssociationLnObjectsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.AssociationLnObjectsResponse)1 BundleAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleAsyncResponse)1 BundleResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.BundleResponse)1 FaultResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FaultResponse)1 FindEventsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.FindEventsResponse)1 GetConfigurationObjectResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse)1 GetMbusEncryptionKeyStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse)1 ReadAlarmRegisterResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ReadAlarmRegisterResponse)1 ScanMbusChannelsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.ScanMbusChannelsResponse)1 Response (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response)1