From 1b0f9b8c625241f20892ae93d5f879022eda6156 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 15 Jan 2019 12:26:14 +0100 Subject: [PATCH] DATACMNS-1439 - Polishing. Extended copyright years. More reasonable defaults in the mock implementation of ImplementationDetectionConfiguration in case someone might want to reuse it in other test cases. Original pull request: #325. --- ...ltImplementationLookupConfigurationUnitTests.java | 2 +- ...mplementationDetectionConfigurationUnitTests.java | 12 +++++++----- .../RepositoryFragmentConfigurationUnitTests.java | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/springframework/data/repository/config/DefaultImplementationLookupConfigurationUnitTests.java b/src/test/java/org/springframework/data/repository/config/DefaultImplementationLookupConfigurationUnitTests.java index 20de2598f..6dc8ac71d 100644 --- a/src/test/java/org/springframework/data/repository/config/DefaultImplementationLookupConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/repository/config/DefaultImplementationLookupConfigurationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 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. diff --git a/src/test/java/org/springframework/data/repository/config/ImplementationDetectionConfigurationUnitTests.java b/src/test/java/org/springframework/data/repository/config/ImplementationDetectionConfigurationUnitTests.java index b739ef142..76cf3bd0b 100644 --- a/src/test/java/org/springframework/data/repository/config/ImplementationDetectionConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/repository/config/ImplementationDetectionConfigurationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 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. @@ -20,6 +20,7 @@ import static org.assertj.core.api.Assertions.*; import org.junit.Test; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; import org.springframework.core.type.filter.TypeFilter; import org.springframework.data.util.Streamable; @@ -27,6 +28,7 @@ import org.springframework.data.util.Streamable; * Unit tests for {@link ImplementationDetectionConfiguration}. * * @author Mark Paluch + * @author Oliver Gierke */ public class ImplementationDetectionConfigurationUnitTests { @@ -48,22 +50,22 @@ public class ImplementationDetectionConfigurationUnitTests { @Override public String getImplementationPostfix() { - return null; + return "Impl"; } @Override public Streamable getBasePackages() { - return null; + return Streamable.empty(); } @Override public Streamable getExcludeFilters() { - return null; + return Streamable.empty(); } @Override public MetadataReaderFactory getMetadataReaderFactory() { - return null; + return new SimpleMetadataReaderFactory(); } } } diff --git a/src/test/java/org/springframework/data/repository/config/RepositoryFragmentConfigurationUnitTests.java b/src/test/java/org/springframework/data/repository/config/RepositoryFragmentConfigurationUnitTests.java index 9932b3638..49353bdcf 100644 --- a/src/test/java/org/springframework/data/repository/config/RepositoryFragmentConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/repository/config/RepositoryFragmentConfigurationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 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.