DATACMNS-166 - Adapted changes in Spring Data Commons.
This commit is contained in:
@@ -53,7 +53,7 @@ public class CustomGenericJpaRepositoryFactory extends JpaRepositoryFactory {
|
||||
protected JpaRepository<?, ?> getTargetRepository(RepositoryMetadata metadata, EntityManager em) {
|
||||
|
||||
JpaEntityInformation<Object, Serializable> entityMetadata = mock(JpaEntityInformation.class);
|
||||
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainClass());
|
||||
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainType());
|
||||
return new CustomGenericJpaRepository<Object, Serializable>(entityMetadata, em);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class NamedQueryUnitTests {
|
||||
public void setUp() throws SecurityException, NoSuchMethodException {
|
||||
|
||||
method = SampleRepository.class.getMethod("foo", Pageable.class);
|
||||
when(metadata.getDomainClass()).thenReturn((Class) String.class);
|
||||
when(metadata.getDomainType()).thenReturn((Class) String.class);
|
||||
when(metadata.getReturnedDomainClass(method)).thenReturn((Class) String.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user