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();
}
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);
}
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);
}
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();
}
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();
}
Aggregations