use of org.openmuc.j60870.ie.IeSinglePointWithQuality in project open-smart-grid-platform by OSGP.
the class IeSinglePointWithQualityConverterTest method testConvertIeSinglePointWithQualityOn.
@Test
public void testConvertIeSinglePointWithQualityOn() {
// Arrange
final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_ON);
final IeSinglePointWithQuality source = new IeSinglePointWithQuality(true, false, false, false, false);
// Act
final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null);
// Assert
assertThat(actual).isEqualTo(expected);
}
use of org.openmuc.j60870.ie.IeSinglePointWithQuality in project open-smart-grid-platform by OSGP.
the class IeSinglePointWithQualityConverterTest method testConvertIeSinglePointWithQualityOff.
@Test
public void testConvertIeSinglePointWithQualityOff() {
// Arrange
final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_OFF);
final IeSinglePointWithQuality source = new IeSinglePointWithQuality(false, false, false, false, false);
// Act
final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null);
// Assert
assertThat(actual).isEqualTo(expected);
}
use of org.openmuc.j60870.ie.IeSinglePointWithQuality in project open-smart-grid-platform by OSGP.
the class IeSinglePointWithQualityConverterTest method testConvertIeSinglePointWithQualitySubstituted.
@Test
public void testConvertIeSinglePointWithQualitySubstituted() {
// Arrange
final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_QUALITY_SUBSTITUTED);
final IeSinglePointWithQuality source = new IeSinglePointWithQuality(false, false, true, false, false);
// Act
final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null);
// Assert
assertThat(actual).isEqualTo(expected);
}
use of org.openmuc.j60870.ie.IeSinglePointWithQuality in project open-smart-grid-platform by OSGP.
the class IeSinglePointWithQualityConverterTest method testConvertIeSinglePointWithQualityAll.
@Test
public void testConvertIeSinglePointWithQualityAll() {
// Arrange
final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_ALL);
final IeSinglePointWithQuality source = new IeSinglePointWithQuality(true, true, true, true, true);
// Act
final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null);
// Assert
assertThat(actual).isEqualTo(expected);
}
use of org.openmuc.j60870.ie.IeSinglePointWithQuality in project open-smart-grid-platform by OSGP.
the class IeSinglePointWithQualityConverterTest method testConvertIeSinglePointWithQualityBlocked.
@Test
public void testConvertIeSinglePointWithQualityBlocked() {
// Arrange
final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_QUALITY_BLOCKED);
final IeSinglePointWithQuality source = new IeSinglePointWithQuality(false, true, false, false, false);
// Act
final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null);
// Assert
assertThat(actual).isEqualTo(expected);
}
Aggregations