DATACMNS-90 - Polishing.

Added missing author tags where needed. Removed the template method to pick up the configuration from the RepositoryConfigurationSource interface as it's not needed from the outside.

Original pull request: #50.
This commit is contained in:
Oliver Gierke
2013-10-22 14:00:15 +02:00
parent 60534974bf
commit 1dfe235a87
6 changed files with 25 additions and 21 deletions

View File

@@ -66,19 +66,19 @@ public class AnnotationRepositoryConfigurationSourceUnitTests {
public void defaultsToPackageOfAnnotatedClass() {
AnnotationMetadata metadata = new StandardAnnotationMetadata(DefaultConfiguration.class);
RepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
AnnotationRepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
EnableRepositories.class, environment);
Iterable<String> packages = source.getBasePackages();
assertThat(packages, hasItem(DefaultConfiguration.class.getPackage().getName()));
assertThat(source.isConsideringNestedRepositoriesEnabled(), is(false));
assertThat(source.shouldConsiderNestedRepositories(), is(false));
}
@Test
public void returnsConfiguredBasePackage() {
AnnotationMetadata metadata = new StandardAnnotationMetadata(DefaultConfigurationWithBasePackage.class);
RepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
AnnotationRepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
EnableRepositories.class, environment);
Iterable<String> packages = source.getBasePackages();
@@ -92,10 +92,10 @@ public class AnnotationRepositoryConfigurationSourceUnitTests {
public void returnsConsiderNestedRepositories() {
AnnotationMetadata metadata = new StandardAnnotationMetadata(DefaultConfigurationWithNestedRepositories.class);
RepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
AnnotationRepositoryConfigurationSource source = new AnnotationRepositoryConfigurationSource(metadata,
EnableRepositories.class, environment);
assertThat(source.isConsideringNestedRepositoriesEnabled(), is(true));
assertThat(source.shouldConsiderNestedRepositories(), is(true));
}
public static class Person {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012 the original author or authors.
* Copyright 2012-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.
@@ -33,9 +33,10 @@ import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.test.util.ReflectionTestUtils;
/**
* Integration tests for the initializer name-space elements.
* Integration tests for the initializer namespace elements.
*
* @author Oliver Gierke
* @author Thomas Darimont
*/
public class ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests {