DATAJPA-416 - Polishing.

Refer to the JPA ticket instead of the DATACMNS one. Use Repository instead of JpaRepository in test cases. Some code formatting.

Original pull request: #46.
This commit is contained in:
Oliver Gierke
2013-10-22 14:23:04 +02:00
parent 2b08a05085
commit b99508fbf9
4 changed files with 8 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2013 the original author or authors.
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.springframework.test.context.ContextConfiguration;
* Integration test for repository name-space configuration with nested repositories.
*
* @author Thomas Darimont
* @author Oliver Gierke
*/
@ContextConfiguration(locations = "classpath:config/namespace-nested-repositories-application-context.xml")
public class AllowNestedRepositoriesRepositoryConfigTests extends AbstractRepositoryConfigTests {
@@ -38,7 +39,6 @@ public class AllowNestedRepositoriesRepositoryConfigTests extends AbstractReposi
*/
@Test
public void shouldFindNestedRepository() {
assertThat(fooRepository, is(notNullValue()));
}
}

View File

@@ -33,6 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* Integration test for the combination of JavaConfig and an {@link Repositories} wrapper.
*
* @author Thomas Darimont
* @author Oliver Gierke
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@@ -50,7 +51,6 @@ public class NestedRepositoriesJavaConfigTests {
*/
@Test
public void shouldSupportNestedRepositories() {
assertThat(nestedUserRepository, is(notNullValue()));
}
}

View File

@@ -16,13 +16,14 @@
package org.springframework.data.jpa.repository.sample;
import org.springframework.data.jpa.domain.sample.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.Repository;
/**
* @see DATACMNS-90
* @see DATAJPA-416
* @author Thomas Darimont
* @author Oliver Gierke
*/
public class ClassWithNestedRepository {
public static interface NestedUserRepository extends JpaRepository<User, Integer> {}
public static interface NestedUserRepository extends Repository<User, Integer> {}
}

View File

@@ -7,6 +7,6 @@
<import resource="../infrastructure.xml" />
<jpa:repositories base-package="org.springframework.**.repository.sample" consider-nested-repositories="true"/>
<jpa:repositories base-package="org.springframework.**.repository.sample" consider-nested-repositories="true"/>
</beans>