2023-03-02
Higher-quality test code for methods involving generic types
Passing method type parameters instead of using casts when generating mocks
when(ownerRepository.findById((Integer) any())).thenReturn(owner); when(ownerRepository.findById(Mockito.<Integer>any())).thenReturn(owner);Easier to read mocking
PostMetaServiceImpl postMetaService = new PostMetaServiceImpl(
(BaseMetaRepository<PostMeta>) mock(BaseMetaRepository.class), mock(PostRepository.class)); PostMetaServiceImpl postMetaService = new PostMetaServiceImpl(mock(BaseMetaRepository.class),
mock(PostRepository.class));Better variable naming for tests
IntelliJ IDEA 2023.1 support
Enhancements
Resolved Issues
Known Issues
Last updated
Was this helpful?

