use of org.opensmartgridplatform.domain.core.valueobjects.Status in project open-smart-grid-platform by OSGP.
the class StatusMappingTest method properlyMapsLightSensorStatus.
@Test
void properlyMapsLightSensorStatus() {
final Status domainStatus = new LightSensorStatus(LightSensorStatusType.LIGHT);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status wsStatus = this.adHocManagementMapper.map(domainStatus, org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status.class);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.LightSensorStatus expected = new org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.LightSensorStatus();
expected.setStatus(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.LightSensorStatusType.LIGHT);
assertThat(wsStatus).isInstanceOf(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.LightSensorStatus.class).usingRecursiveComparison().isEqualTo(expected);
}
use of org.opensmartgridplatform.domain.core.valueobjects.Status in project open-smart-grid-platform by OSGP.
the class StatusMappingTest method properlyMapsDeviceStatusMapped.
@Test
void properlyMapsDeviceStatusMapped() {
final TariffValue tv1 = new TariffValue();
tv1.setHigh(true);
final List<TariffValue> tariffValues = Arrays.asList(tv1);
final Status domainStatus = new DeviceStatusMapped(tariffValues, LIGHT_VALUES, PREFERRED_LINK_TYPE, ACTUAL_LINK_TYPE, LIGHT_TYPE, EVENT_NOTIFICATIONS_MASK);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status wsStatus = this.adHocManagementMapper.map(domainStatus, org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status.class);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.DeviceStatus expected = expectedDeviceStatus();
assertThat(wsStatus).isInstanceOf(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.DeviceStatus.class).usingRecursiveComparison().isEqualTo(expected);
}
use of org.opensmartgridplatform.domain.core.valueobjects.Status in project open-smart-grid-platform by OSGP.
the class StatusMappingTest method properlyMapsDeviceStatus.
@Test
void properlyMapsDeviceStatus() {
final Status domainStatus = new DeviceStatus(LIGHT_VALUES, PREFERRED_LINK_TYPE, ACTUAL_LINK_TYPE, LIGHT_TYPE, EVENT_NOTIFICATIONS_MASK);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status wsStatus = this.adHocManagementMapper.map(domainStatus, org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.Status.class);
final org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.DeviceStatus expected = expectedDeviceStatus();
assertThat(wsStatus).isInstanceOf(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.DeviceStatus.class).usingRecursiveComparison().isEqualTo(expected);
}
Aggregations