DATACMNS-794 - Repositories now exposes RepositoryInformation for repository interfaces.

This commit is contained in:
Oliver Gierke
2015-12-10 08:23:24 +01:00
parent 755a4cfaec
commit c60cd647cc
2 changed files with 37 additions and 3 deletions

View File

@@ -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 {}