Search in sources :

Example 1 with ResponseData

use of org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData in project open-smart-grid-platform by OSGP.

the class WsCoreResponseDataSteps method theResponseDataRecordShouldNotBeDeleted.

@Then("^the response data record with correlation uid \\\"(.*)\\\" should not be deleted in ws-core$")
public void theResponseDataRecordShouldNotBeDeleted(final String correlationUid) {
    final ResponseData responseData = this.responseDataRepository.findByCorrelationUid(correlationUid);
    assertThat(responseData).as("Response data should not be deleted in ws-core").isNotNull();
}
Also used : ResponseData(org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData) Then(io.cucumber.java.en.Then)

Example 2 with ResponseData

use of org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData in project open-smart-grid-platform by OSGP.

the class WsCoreResponseDataSteps method assertResponseDataHasNotificationsAndMessageType.

private void assertResponseDataHasNotificationsAndMessageType(final String correlationUid, final Short expectedNumberOfNotificationsSent, final String expectedMessageType) {
    final ResponseData responseData = this.responseDataRepository.findByCorrelationUid(correlationUid);
    assertThat(responseData.getNumberOfNotificationsSent()).as(PlatformKeys.KEY_NUMBER_OF_NOTIFICATIONS_SENT).isEqualTo(expectedNumberOfNotificationsSent);
    assertThat(responseData.getMessageType()).as(PlatformKeys.KEY_MESSAGE_TYPE).isEqualTo(expectedMessageType);
}
Also used : ResponseData(org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData)

Example 3 with ResponseData

use of org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData in project open-smart-grid-platform by OSGP.

the class WsPublicLightingResponseDataSteps method assertResponseDataHasNotificationsAndMessageType.

private void assertResponseDataHasNotificationsAndMessageType(final String correlationUid, final Short expectedNumberOfNotificationsSent, final String expectedMessageType, final ResponseDataRepository responseDataRespository) {
    final ResponseData responseData = responseDataRespository.findByCorrelationUid(correlationUid);
    assertThat(responseData.getNumberOfNotificationsSent()).as(PlatformKeys.KEY_NUMBER_OF_NOTIFICATIONS_SENT).isEqualTo(expectedNumberOfNotificationsSent);
    assertThat(responseData.getMessageType()).as(PlatformKeys.KEY_MESSAGE_TYPE).isEqualTo(expectedMessageType);
}
Also used : ResponseData(org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData)

Example 4 with ResponseData

use of org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData in project open-smart-grid-platform by OSGP.

the class WsSmartMeteringResponseDataSteps method theResponseDataRecordShouldBeDeleted.

@Then("^the response data record with correlation uid \\\"(.*)\\\" should be deleted$")
public void theResponseDataRecordShouldBeDeleted(final String correlationUid) {
    final ResponseData responseData = this.smartMeteringResponseDataRepository.findByCorrelationUid(correlationUid);
    assertThat(responseData).as("Response data should be deleted").isNull();
}
Also used : ResponseData(org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData) Then(io.cucumber.java.en.Then)

Example 5 with ResponseData

use of org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData in project open-smart-grid-platform by OSGP.

the class WsMicrogridsResponseDataSteps method theResponseDataRecordShouldNotBeDeleted.

@Then("^the response data record with correlation uid \\\"(.*)\\\" should not be deleted$")
public void theResponseDataRecordShouldNotBeDeleted(final String correlationUid) {
    final ResponseData responseData = this.microgridsResponseDataRepository.findByCorrelationUid(correlationUid);
    assertThat(responseData).as("Response data should not be deleted").isNotNull();
}
Also used : ResponseData(org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData) Then(io.cucumber.java.en.Then)

Aggregations

ResponseData (org.opensmartgridplatform.adapter.ws.domain.entities.ResponseData)86 PayloadRoot (org.springframework.ws.server.endpoint.annotation.PayloadRoot)52 ResponsePayload (org.springframework.ws.server.endpoint.annotation.ResponsePayload)52 OsgpException (org.opensmartgridplatform.shared.exceptionhandling.OsgpException)51 IOException (java.io.IOException)23 GetKeysResponseData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetKeysResponseData)23 FunctionalException (org.opensmartgridplatform.shared.exceptionhandling.FunctionalException)23 ConstraintViolationException (javax.validation.ConstraintViolationException)13 ValidationException (org.opensmartgridplatform.domain.core.exceptions.ValidationException)13 TechnicalException (org.opensmartgridplatform.shared.exceptionhandling.TechnicalException)11 Then (io.cucumber.java.en.Then)8 Serializable (java.io.Serializable)7 GetGsmDiagnosticResponseData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.GetGsmDiagnosticResponseData)6 SetDeviceLifecycleStatusByChannelResponseData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceLifecycleStatusByChannelResponseData)6 ScanMbusChannelsResponseData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ScanMbusChannelsResponseData)5 Field (java.lang.reflect.Field)4 ResponseDataBuilder (org.opensmartgridplatform.cucumber.platform.glue.steps.database.ws.ResponseDataBuilder)4 Given (io.cucumber.java.en.Given)3 ResponseMessage (org.opensmartgridplatform.shared.infra.jms.ResponseMessage)3 Transactional (org.springframework.transaction.annotation.Transactional)3