use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.AlarmType in project open-smart-grid-platform by OSGP.
the class AlarmRegisterMappingTest method testWithEmptySet.
/**
* Test to see if an AlarmRegister object is mapped correctly with an empty Set.
*/
@Test
public void testWithEmptySet() {
// build test data
final Set<AlarmType> alarmTypeSet = new TreeSet<>();
final AlarmRegister original = new AlarmRegister(alarmTypeSet);
// actual mapping
final org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.AlarmRegister mapped = this.monitoringMapper.map(original, org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.AlarmRegister.class);
// check mapping
assertThat(mapped).isNotNull();
assertThat(mapped.getAlarmTypes()).isNotNull();
assertThat(mapped.getAlarmTypes().isEmpty()).isTrue();
}
Aggregations