@Test( dataProviderClass = DataProviders.class, dataProvider = "initialDataAndValueToBeSetWithExpectedOfSetByteUnitValueTakingByteArrayValue") public void setByteUnitValueTakingByteArrayValue_SetsTheValueToSpecifiedPosition( String initial, String value, int offset, String expected) { ByteArrayAdapter tested = new ByteArrayAdapter(parse(initial)); tested.setByteUnitValue(parse(value), offset); assertEquals(print(tested.getData()), expected); }
@Test( dataProviderClass = DataProviders.class, dataProvider = "initialDataAndValueToBeSetWithExpectedOfSetBitUnitValue") public void setBitUnitValue_SetsTheValueAsLittleEndianToSpecifiedPosition( String initial, int value, int offset, int length, String expected) { ByteArrayAdapter tested = new ByteArrayAdapter(parse(initial)); tested.setBitUnitValue(value, offset, length); assertEquals(print(tested.getData()), expected); }