|
34 | 34 | import org.springframework.beans.factory.config.ConstructorArgumentValues;
|
35 | 35 | import org.springframework.beans.factory.support.RootBeanDefinition;
|
36 | 36 | import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
37 |
| -import org.springframework.data.util.Streamable; |
38 | 37 |
|
39 | 38 | /**
|
40 | 39 | * Unit tests for {@link DefaultRepositoryConfiguration}.
|
@@ -84,33 +83,6 @@ public void prefersSourcesRepositoryFactoryBeanClass() {
|
84 | 83 | assertThat(getConfiguration(source).getRepositoryFactoryBeanClassName()).isEqualTo("custom");
|
85 | 84 | }
|
86 | 85 |
|
87 |
| - @Test // DATACMNS-1172 |
88 |
| - public void limitsImplementationBasePackages() { |
89 |
| - |
90 |
| - when(source.shouldLimitRepositoryImplementationBasePackages()).thenReturn(true); |
91 |
| - |
92 |
| - assertThat(getConfiguration(source, "com.acme.MyRepository").getImplementationBasePackages()) |
93 |
| - .containsOnly("com.acme"); |
94 |
| - } |
95 |
| - |
96 |
| - @Test // DATACMNS-1172 |
97 |
| - public void limitsImplementationBasePackagesOfNestedClass() { |
98 |
| - |
99 |
| - when(source.shouldLimitRepositoryImplementationBasePackages()).thenReturn(true); |
100 |
| - |
101 |
| - assertThat(getConfiguration(source, NestedInterface.class.getName()).getImplementationBasePackages()) |
102 |
| - .containsOnly("org.springframework.data.repository.config"); |
103 |
| - } |
104 |
| - |
105 |
| - @Test // DATACMNS-1172 |
106 |
| - public void shouldNotLimitImplementationBasePackages() { |
107 |
| - |
108 |
| - when(source.getBasePackages()).thenReturn(Streamable.of("com", "org.coyote")); |
109 |
| - |
110 |
| - assertThat(getConfiguration(source, "com.acme.MyRepository").getImplementationBasePackages()).contains("com", |
111 |
| - "org.coyote"); |
112 |
| - } |
113 |
| - |
114 | 86 | private DefaultRepositoryConfiguration<RepositoryConfigurationSource> getConfiguration(
|
115 | 87 | RepositoryConfigurationSource source) {
|
116 | 88 | return getConfiguration(source, "com.acme.MyRepository");
|
|
0 commit comments