use of org.opensmartgridplatform.dto.valueobjects.smartmetering.PushSetupSmsDto in project open-smart-grid-platform by OSGP.
the class PushSetupSmsMappingTest method testPushSetupSmsMappingWithEmptyLists.
// To test if a PushSetupAlarm can be mapped if instance variables are
// initialized and lists are empty.
@Test
public void testPushSetupSmsMappingWithEmptyLists() {
// build test data
final ArrayList<CosemObjectDefinition> pushObjectList = new ArrayList<>();
final ArrayList<WindowElement> communicationWindow = new ArrayList<>();
final PushSetupSms pushSetupSms = new PushSetupSmsBuilder().withEmptyLists(pushObjectList, communicationWindow).build();
// actual mapping
final PushSetupSmsDto pushSetupSmsDto = this.configurationMapper.map(pushSetupSms, PushSetupSmsDto.class);
// check values
this.checkCosemObisCodeMapping(pushSetupSms.getLogicalName(), pushSetupSmsDto.getLogicalName());
this.checkSendDestinationAndMethodMapping(pushSetupSms, pushSetupSmsDto);
this.checkIntegerMapping(pushSetupSms, pushSetupSmsDto);
assertThat(pushSetupSmsDto.getPushObjectList()).isNotNull();
assertThat(pushSetupSmsDto.getCommunicationWindow()).isNotNull();
}
Aggregations