use of org.mapstruct.ap.test.bugs._895.MultiArrayMapper.WithListOfByteArray in project mapstruct by mapstruct.
the class Issue895Test method properlyMapsMultiDimensionalArrays.
@ProcessorTest
public void properlyMapsMultiDimensionalArrays() {
WithArrayOfByteArray arrayOfByteArray = new WithArrayOfByteArray();
arrayOfByteArray.setBytes(new byte[][] { new byte[] { 0, 1 }, new byte[] { 1, 2 } });
WithListOfByteArray listOfByteArray = Mappers.getMapper(MultiArrayMapper.class).convert(arrayOfByteArray);
assertThat(listOfByteArray.getBytes()).containsExactly(new byte[] { 0, 1 }, new byte[] { 1, 2 });
arrayOfByteArray = Mappers.getMapper(MultiArrayMapper.class).convert(listOfByteArray);
assertThat(arrayOfByteArray.getBytes()).isDeepEqualTo(new byte[][] { { 0, 1 }, { 1, 2 } });
}
Aggregations