Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7
.
This commit is contained in:
parent
db2b00a2a5
commit
65fb26f847
31
build.gradle
31
build.gradle
|
@ -111,7 +111,7 @@ configure(allprojects.findAll{it.name in ["spring", "spring-jms", "spring-orm",
|
|||
}
|
||||
}
|
||||
|
||||
configure(subprojects - project(":spring-build-junit")) { subproject ->
|
||||
configure(subprojects) { subproject ->
|
||||
apply plugin: "merge"
|
||||
apply from: "${gradleScriptDir}/publish-maven.gradle"
|
||||
|
||||
|
@ -160,15 +160,11 @@ configure(subprojects - project(":spring-build-junit")) { subproject ->
|
|||
}
|
||||
}
|
||||
|
||||
configure(allprojects - project(":spring-build-junit")) {
|
||||
configure(allprojects) {
|
||||
dependencies {
|
||||
testCompile(project(":spring-build-junit"))
|
||||
testCompile("junit:junit:${junitVersion}")
|
||||
testCompile("org.hamcrest:hamcrest-all:1.3")
|
||||
}
|
||||
|
||||
eclipse.classpath.file.whenMerged { classpath ->
|
||||
classpath.entries.find{it.path == "/spring-build-junit"}.exported = false
|
||||
}
|
||||
|
||||
test.systemProperties.put("testGroups", properties.get("testGroups"))
|
||||
}
|
||||
|
||||
|
@ -184,23 +180,6 @@ project("spring-build-src") {
|
|||
configurations.archives.artifacts.clear()
|
||||
}
|
||||
|
||||
project("spring-build-junit") {
|
||||
description = "Build-time JUnit dependencies and utilities"
|
||||
|
||||
// NOTE: This is an internal project and is not published.
|
||||
|
||||
dependencies {
|
||||
compile("commons-logging:commons-logging:1.1.1")
|
||||
compile("junit:junit:${junitVersion}")
|
||||
compile("org.hamcrest:hamcrest-all:1.3")
|
||||
compile("org.easymock:easymock:${easymockVersion}")
|
||||
}
|
||||
|
||||
// Don't actually generate any artifacts
|
||||
configurations.archives.artifacts.clear()
|
||||
}
|
||||
|
||||
|
||||
project("spring-core") {
|
||||
description = "Spring Core"
|
||||
|
||||
|
@ -549,7 +528,6 @@ project("spring-orm") {
|
|||
testCompile("org.eclipse.persistence:org.eclipse.persistence.asm:1.0.1")
|
||||
testCompile("org.eclipse.persistence:org.eclipse.persistence.antlr:1.0.1")
|
||||
testCompile("hsqldb:hsqldb:${hsqldbVersion}")
|
||||
testCompile(project(":spring-web").sourceSets.test.output)
|
||||
compile(project(":spring-core"))
|
||||
compile(project(":spring-beans"))
|
||||
optional(project(":spring-aop"))
|
||||
|
@ -799,6 +777,7 @@ configure(rootProject) {
|
|||
|
||||
dependencies { // for integration tests
|
||||
testCompile(project(":spring-core"))
|
||||
testCompile(project(":spring-core").sourceSets.test.output)
|
||||
testCompile(project(":spring-beans"))
|
||||
testCompile(project(":spring-aop"))
|
||||
testCompile(project(":spring-expression"))
|
||||
|
|
|
@ -22,7 +22,6 @@ include "spring-web"
|
|||
include "spring-webmvc"
|
||||
include "spring-webmvc-portlet"
|
||||
include "spring-webmvc-tiles3"
|
||||
include "spring-build-junit"
|
||||
|
||||
// Exposes gradle buildSrc for IDE support
|
||||
include "buildSrc"
|
||||
|
|
|
@ -19,8 +19,8 @@ package org.springframework.aop.target.dynamic;
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
|
||||
/**
|
||||
* @author Rob Harrop
|
||||
|
|
|
@ -49,8 +49,8 @@ import org.springframework.beans.propertyeditors.CustomNumberEditor;
|
|||
import org.springframework.beans.propertyeditors.StringArrayPropertyEditor;
|
||||
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
||||
import org.springframework.beans.support.DerivedFromProtectedBaseBean;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.core.convert.ConversionFailedException;
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
|
|
|
@ -72,8 +72,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition;
|
|||
import org.springframework.beans.factory.xml.ConstructorDependenciesBean;
|
||||
import org.springframework.beans.factory.xml.DependenciesBean;
|
||||
import org.springframework.beans.propertyeditors.CustomNumberEditor;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
|
|
|
@ -56,8 +56,8 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
|||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.support.StaticListableBeanFactory;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.context.support.StaticApplicationContext;
|
||||
import org.springframework.core.io.FileSystemResourceLoader;
|
||||
|
|
|
@ -51,8 +51,8 @@ import org.springframework.beans.factory.config.MethodInvokingFactoryBean;
|
|||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
|
|
@ -31,8 +31,8 @@ import org.springframework.beans.factory.annotation.Required;
|
|||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier;
|
|||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.GenericBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.context.annotation.AnnotationConfigUtils;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
|
|
@ -22,8 +22,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
|
@ -35,8 +35,6 @@ import java.util.UUID;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.core.convert.ConversionFailedException;
|
||||
import org.springframework.core.convert.ConverterNotFoundException;
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
|
@ -46,6 +44,8 @@ import org.springframework.core.convert.converter.ConverterFactory;
|
|||
import org.springframework.core.convert.converter.GenericConverter;
|
||||
import org.springframework.core.io.DescriptiveResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.util.StopWatch;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.junit;
|
||||
package org.springframework.tests;
|
||||
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
|
@ -24,8 +24,9 @@ import org.apache.commons.logging.Log;
|
|||
import org.junit.internal.AssumptionViolatedException;
|
||||
|
||||
/**
|
||||
* Provides utility methods that allow JUnit tests to {@link Assume} certain conditions
|
||||
* hold {@code true}. If the assumption fails, it means the test should be skipped.
|
||||
* Provides utility methods that allow JUnit tests to {@link org.junit.Assume} certain
|
||||
* conditions hold {@code true}. If the assumption fails, it means the test should be
|
||||
* skipped.
|
||||
*
|
||||
* <p>For example, if a set of tests require at least JDK 1.7 it can use
|
||||
* {@code Assume#atLeast(JdkVersion.JAVA_17)} as shown below:
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.junit;
|
||||
package org.springframework.tests;
|
||||
|
||||
/**
|
||||
* Enumeration of known JDK versions.
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.junit;
|
||||
package org.springframework.tests;
|
||||
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
import static org.junit.Assert.*;
|
||||
|
@ -26,7 +26,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class JavaVersionTest {
|
||||
public class JavaVersionTests {
|
||||
|
||||
@Test
|
||||
public void runningVersion() {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.test.hamcrest;
|
||||
package org.springframework.tests;
|
||||
|
||||
import org.hamcrest.BaseMatcher;
|
||||
import org.hamcrest.Description;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.test.mockito;
|
||||
package org.springframework.tests;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.junit;
|
||||
package org.springframework.tests;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.build.junit;
|
||||
package org.springframework.tests;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
@ -32,7 +32,7 @@ import org.junit.rules.ExpectedException;
|
|||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class TestGroupTest {
|
||||
public class TestGroupTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright 2002-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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Shared utilities that are used internally throughout the test suite but are not
|
||||
* published. This package should not be confused with {@code org.springframework.test}
|
||||
* which contains published code from the 'spring-test' module.
|
||||
*/
|
||||
package org.springframework.tests;
|
|
@ -31,10 +31,10 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.springframework.build.test.mockito.MockitoUtils;
|
||||
import org.springframework.build.test.mockito.MockitoUtils.InvocationArgumentsAdapter;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.tests.MockitoUtils;
|
||||
import org.springframework.tests.MockitoUtils.InvocationArgumentsAdapter;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.ContentHandler;
|
||||
import org.xml.sax.InputSource;
|
||||
|
|
|
@ -20,8 +20,8 @@ import static org.junit.Assert.fail;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
|
|
|
@ -34,7 +34,7 @@ import static org.mockito.Mockito.never;
|
|||
import static org.mockito.Mockito.reset;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.springframework.build.test.hamcrest.Matchers.exceptionCause;
|
||||
import static org.springframework.tests.Matchers.exceptionCause;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
|
|
|
@ -22,7 +22,7 @@ import static org.mockito.BDDMockito.given;
|
|||
import static org.mockito.Mockito.atLeastOnce;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.springframework.build.test.hamcrest.Matchers.exceptionCause;
|
||||
import static org.springframework.tests.Matchers.exceptionCause;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
|
|
|
@ -19,9 +19,9 @@ package org.springframework.web.bind;
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.mock.web.test.MockHttpServletRequest;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,8 +19,8 @@ package org.springframework.web.portlet.bind;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.mock.web.portlet.MockPortletRequest;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@ import org.junit.Test;
|
|||
|
||||
import org.springframework.aop.support.AopUtils;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.build.junit.Assume;
|
||||
import org.springframework.build.junit.TestGroup;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.transaction.CallCountingTransactionManager;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
|
Loading…
Reference in New Issue