Search in sources :

Example 1 with Measurement

use of org.opensmartgridplatform.domain.da.measurements.Measurement in project open-smart-grid-platform by OSGP.

the class DomainDistributionAutomationMapperTest method testMeasurementMapping.

@Test
public void testMeasurementMapping() {
    // Arrange
    final float gasFlowMeasurement = 3077f;
    final Measurement expected = DomainMeasurementsFactory.gasFlowMeasurement(gasFlowMeasurement);
    final MeasurementDto dtoMeasurement = DtoMeasurementsFactory.gasFlowMeasurement(gasFlowMeasurement);
    // Act
    final Measurement actual = this.mapper.map(dtoMeasurement, Measurement.class);
    // Assert
    assertThat(actual).isEqualTo(expected);
}
Also used : Measurement(org.opensmartgridplatform.domain.da.measurements.Measurement) MeasurementDto(org.opensmartgridplatform.dto.da.measurements.MeasurementDto) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Measurement (org.opensmartgridplatform.domain.da.measurements.Measurement)1 MeasurementDto (org.opensmartgridplatform.dto.da.measurements.MeasurementDto)1