@Test public void shouldConvertIeQualityNotTopicalToByte() { final BitmaskMeasurementElementDto expected = new BitmaskMeasurementElementDto((byte) IE_QUALITY_NOT_TOPICAL); final IeQuality source = new IeQuality(false, false, false, true, false); final BitmaskMeasurementElementDto actual = this.converter.convert(source, null, null); assertThat(actual).isEqualTo(expected); }
@Override public BitmaskMeasurementElementDto convert(final IeQuality source, final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext) { int value = 0; value += source.isOverflow() ? BIT_OVERFLOW : 0; value += source.isBlocked() ? BIT_BLOCKED : 0; value += source.isSubstituted() ? BIT_SUBSTITUTED : 0; value += source.isNotTopical() ? BIT_NOT_TOPICAL : 0; value += source.isInvalid() ? BIT_INVALID : 0; return new BitmaskMeasurementElementDto((byte) value); }
IeQualityConverter extends CustomConverter<IeQuality, BitmaskMeasurementElementDto> { @Override public BitmaskMeasurementElementDto convert(final IeQuality source, final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext) { int value = 0; value += source.isOverflow() ? BIT_OVERFLOW : 0; value += source.isBlocked() ? BIT_BLOCKED : 0; value += source.isSubstituted() ? BIT_SUBSTITUTED : 0; value += source.isNotTopical() ? BIT_NOT_TOPICAL : 0; value += source.isInvalid() ? BIT_INVALID : 0; return new BitmaskMeasurementElementDto((byte) value); } }
IeQualityConverter extends CustomConverter<IeQuality, BitmaskMeasurementElementDto> { @Override public BitmaskMeasurementElementDto convert(final IeQuality source, final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext) { int value = 0; value += source.isOverflow() ? BIT_OVERFLOW : 0; value += source.isBlocked() ? BIT_BLOCKED : 0; value += source.isSubstituted() ? BIT_SUBSTITUTED : 0; value += source.isNotTopical() ? BIT_NOT_TOPICAL : 0; value += source.isInvalid() ? BIT_INVALID : 0; return new BitmaskMeasurementElementDto((byte) value); }  }
IeQualityConverter extends CustomConverter<IeQuality, BitmaskMeasurementElementDto> { @Override public BitmaskMeasurementElementDto convert(final IeQuality source, final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext) { int value = 0; value += source.isOverflow() ? BIT_OVERFLOW : 0; value += source.isBlocked() ? BIT_BLOCKED : 0; value += source.isSubstituted() ? BIT_SUBSTITUTED : 0; value += source.isNotTopical() ? BIT_NOT_TOPICAL : 0; value += source.isInvalid() ? BIT_INVALID : 0; return new BitmaskMeasurementElementDto((byte) value); }  @Override BitmaskMeasurementElementDto convert(final IeQuality source,
            final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext); }
IeQualityConverter extends CustomConverter<IeQuality, BitmaskMeasurementElementDto> { @Override public BitmaskMeasurementElementDto convert(final IeQuality source, final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext) { int value = 0; value += source.isOverflow() ? BIT_OVERFLOW : 0; value += source.isBlocked() ? BIT_BLOCKED : 0; value += source.isSubstituted() ? BIT_SUBSTITUTED : 0; value += source.isNotTopical() ? BIT_NOT_TOPICAL : 0; value += source.isInvalid() ? BIT_INVALID : 0; return new BitmaskMeasurementElementDto((byte) value); }  @Override BitmaskMeasurementElementDto convert(final IeQuality source,
            final Type<? extends BitmaskMeasurementElementDto> destinationType, final MappingContext mappingContext);  }