DATACMNS-794 - Repositories now exposes RepositoryInformation for repository interfaces.
This commit is contained in:
@@ -17,7 +17,7 @@ import org.springframework.data.repository.core.support.DefaultRepositoryMetadat
|
||||
*/
|
||||
package org.springframework.data.repository.support;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -139,6 +139,18 @@ public class RepositoriesUnitTests {
|
||||
context.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-794
|
||||
*/
|
||||
@Test
|
||||
public void exposesRepositoryFactoryInformationForRepository() {
|
||||
|
||||
RepositoryInformation information = new Repositories(context).getRepositoryInformation(PersonRepository.class);
|
||||
|
||||
assertThat(information, is(notNullValue()));
|
||||
assertThat(information.getRepositoryInterface(), is(typeCompatibleWith(PersonRepository.class)));
|
||||
}
|
||||
|
||||
class Person {}
|
||||
|
||||
class Address {}
|
||||
|
||||
Reference in New Issue
Block a user