Mapstruct abstract mapper injected in JUnit test
Mockito can inject it. Just define the mapper as a Mockito spy, by getting the real mapper
@Spy
private XMapper xMapper = Mappers.getMapper(XMapper.class);
@InjectMocks
private Service service;
Mockito can inject it. Just define the mapper as a Mockito spy, by getting the real mapper
@Spy
private XMapper xMapper = Mappers.getMapper(XMapper.class);
@InjectMocks
private Service service;
From here you can search these documents. Enter your search terms below.
Keys | Action |
---|---|
? | Open this help |
n | Next page |
p | Previous page |
s | Search |