use of org.opensmartgridplatform.dto.valueobjects.smartmetering.ActionDto in project open-smart-grid-platform by OSGP.
the class BundleServiceTest method assertResult.
private void assertResult(final BundleMessagesRequestDto result) {
assertThat(result).isNotNull();
assertThat(result.getActionList()).isNotNull();
for (final ActionDto actionDto : result.getActionList()) {
assertThat(actionDto.getRequest()).isNotNull();
assertThat(actionDto.getResponse()).isNotNull();
}
}
use of org.opensmartgridplatform.dto.valueobjects.smartmetering.ActionDto in project open-smart-grid-platform by OSGP.
the class BundleServiceTest method testException.
@Test
public void testException() {
final List<ActionDto> actionDtoList = this.makeActions();
final BundleMessagesRequestDto dto = new BundleMessagesRequestDto(actionDtoList);
this.getStub(FindEventsRequestDto.class).failWith(new ProtocolAdapterException("simulate error"));
final BundleMessagesRequestDto result = this.callExecutors(dto, this.messageMetadata);
this.assertResult(result);
}
use of org.opensmartgridplatform.dto.valueobjects.smartmetering.ActionDto in project open-smart-grid-platform by OSGP.
the class BundleServiceTest method testHappyFlow.
@Test
public void testHappyFlow() {
final List<ActionDto> actionDtoList = this.makeActions();
final BundleMessagesRequestDto dto = new BundleMessagesRequestDto(actionDtoList);
final BundleMessagesRequestDto result = this.callExecutors(dto, this.messageMetadata);
this.assertResult(result);
}
Aggregations