DATACMNS-867 - Fix generic type matching for reactive repository base method discovery.
Base method discovery is now aligned with blocking base method discovery to consider type variables in parameter assignability checking. Related ticket: DATACMNS-836.
This commit is contained in:
committed by
Oliver Gierke
parent
7c31d9916a
commit
798bbc3b0c
@@ -38,7 +38,7 @@ import org.springframework.data.repository.reactive.ReactiveSortingRepository;
|
||||
*
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
@RunWith(MockitoJUnitRunner.Silent.class)
|
||||
public class ReactiveWrapperRepositoryFactorySupportUnitTests {
|
||||
|
||||
public @Rule ExpectedException exception = ExpectedException.none();
|
||||
@@ -69,18 +69,9 @@ public class ReactiveWrapperRepositoryFactorySupportUnitTests {
|
||||
Serializable id = 1L;
|
||||
ConvertingRepository repository = factory.getRepository(ConvertingRepository.class);
|
||||
repository.exists(id);
|
||||
repository.exists((Long) id);
|
||||
|
||||
verify(backingRepo, times(1)).exists(id);
|
||||
}
|
||||
|
||||
@Test // DATACMNS-836
|
||||
public void doesNotCallMethodOnBaseEvenIfDeclaredTypeCouldBeConverted() {
|
||||
|
||||
Long id = 1L;
|
||||
ConvertingRepository repository = factory.getRepository(ConvertingRepository.class);
|
||||
repository.exists(id);
|
||||
|
||||
verifyZeroInteractions(backingRepo);
|
||||
verify(backingRepo, times(2)).exists(id);
|
||||
}
|
||||
|
||||
@Test // DATACMNS-836
|
||||
|
||||
Reference in New Issue
Block a user