Search in sources :

Example 1 with IeShortFloat

use of org.openmuc.j60870.ie.IeShortFloat in project open-smart-grid-platform by OSGP.

the class IeShortFloatConverterTest method shouldConvertIeShortFloatToFloatMeasurementElementDto.

@Test
public void shouldConvertIeShortFloatToFloatMeasurementElementDto() {
    // Arrange
    final float value = 10.0f;
    final FloatMeasurementElementDto expected = new FloatMeasurementElementDto(value);
    final IeShortFloat source = new IeShortFloat(value);
    // Act
    final FloatMeasurementElementDto actual = this.converter.convert(source, null, null);
    // Assert
    assertThat(actual).isEqualTo(expected);
}
Also used : FloatMeasurementElementDto(org.opensmartgridplatform.dto.da.measurements.elements.FloatMeasurementElementDto) IeShortFloat(org.openmuc.j60870.ie.IeShortFloat) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 IeShortFloat (org.openmuc.j60870.ie.IeShortFloat)1 FloatMeasurementElementDto (org.opensmartgridplatform.dto.da.measurements.elements.FloatMeasurementElementDto)1