Accept target type in KeyValueAdapter.entries(…) and getAllOf(…).
We now accept the target type in both methods to retain type hints so that the underlying adapter implementation can use this type when materializing object instances. Original Pull Request: #356
This commit is contained in:
committed by
Christoph Strobl
parent
bbaa63501d
commit
ad5d2268ec
@@ -190,7 +190,7 @@ class KeyValueTemplateUnitTests {
|
||||
|
||||
template.findAll(Foo.class);
|
||||
|
||||
verify(adapterMock, times(1)).getAllOf(Foo.class.getName());
|
||||
verify(adapterMock, times(1)).getAllOf(Foo.class.getName(), Foo.class);
|
||||
}
|
||||
|
||||
@Test // DATACMNS-525
|
||||
@@ -327,7 +327,7 @@ class KeyValueTemplateUnitTests {
|
||||
void findAllOfShouldRespectTypeAliasAndFilterNonMatchingTypes() {
|
||||
|
||||
Collection foo = Arrays.asList(ALIASED_USING_ALIAS_FOR, SUBCLASS_OF_ALIASED_USING_ALIAS_FOR);
|
||||
when(adapterMock.getAllOf("aliased")).thenReturn(foo);
|
||||
when(adapterMock.getAllOf("aliased", SUBCLASS_OF_ALIASED_USING_ALIAS_FOR.getClass())).thenReturn(foo);
|
||||
|
||||
assertThat((Iterable) template.findAll(SUBCLASS_OF_ALIASED_USING_ALIAS_FOR.getClass()))
|
||||
.contains(SUBCLASS_OF_ALIASED_USING_ALIAS_FOR);
|
||||
|
||||
Reference in New Issue
Block a user