Move support test classes to io.spring.initializr.test

Previously, the Assert helpers were located in the support package that
is also used by some support classes in the production code. Having both
test helpers and tests in the same package is a bit confusing.

Those test helpers are now relocated to a dedicated test package.
This commit is contained in:
Stephane Nicoll
2015-01-14 11:55:34 +01:00
parent 6f4d940ff7
commit b8e26a2d3a
16 changed files with 53 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -16,7 +16,7 @@
package io.spring.initializr
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.test.InitializrMetadataBuilder
import org.junit.Test
import static org.junit.Assert.*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -17,7 +17,7 @@
package io.spring.initializr
import groovy.json.JsonSlurper
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.test.InitializrMetadataBuilder
import org.junit.Test
import static org.junit.Assert.assertEquals

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -16,7 +16,7 @@
package io.spring.initializr
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.test.InitializrMetadataBuilder
import org.junit.Rule
import org.junit.Test
import org.junit.rules.ExpectedException

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -16,9 +16,9 @@
package io.spring.initializr
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.support.MetricsAssert
import io.spring.initializr.support.TestCounterService
import io.spring.initializr.test.InitializrMetadataBuilder
import io.spring.initializr.test.MetricsAssert
import io.spring.initializr.test.TestCounterService
import org.junit.Before
import org.junit.Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -16,10 +16,10 @@
package io.spring.initializr
import io.spring.initializr.support.GradleBuildAssert
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.support.PomAssert
import io.spring.initializr.support.ProjectAssert
import io.spring.initializr.test.GradleBuildAssert
import io.spring.initializr.test.InitializrMetadataBuilder
import io.spring.initializr.test.PomAssert
import io.spring.initializr.test.ProjectAssert
import org.junit.Before
import org.junit.Rule
import org.junit.Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -16,7 +16,7 @@
package io.spring.initializr
import io.spring.initializr.support.InitializrMetadataBuilder
import io.spring.initializr.test.InitializrMetadataBuilder
import org.junit.Rule
import org.junit.Test
import org.junit.rules.ExpectedException

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import io.spring.initializr.ProjectRequest

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import io.spring.initializr.InitializrMetadata

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import static org.junit.Assert.assertEquals
import static org.junit.Assert.fail

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import io.spring.initializr.InitializrMetadata
import io.spring.initializr.ProjectRequest

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import io.spring.initializr.InitializrMetadata

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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 io.spring.initializr.support
package io.spring.initializr.test
import org.springframework.boot.actuate.metrics.CounterService

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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,8 +20,8 @@ import com.gargoylesoftware.htmlunit.WebClient
import com.gargoylesoftware.htmlunit.WebRequest
import com.gargoylesoftware.htmlunit.WebResponse
import com.gargoylesoftware.htmlunit.html.HtmlPage
import io.spring.initializr.support.PomAssert
import io.spring.initializr.support.ProjectAssert
import io.spring.initializr.test.PomAssert
import io.spring.initializr.test.ProjectAssert
import io.spring.initializr.web.support.HomePage
import org.junit.After
import org.junit.Before

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -19,7 +19,7 @@ package io.spring.initializr.web
import io.spring.initializr.DefaultInitializrMetadataProvider
import io.spring.initializr.InitializrMetadata
import io.spring.initializr.InitializrMetadataProvider
import io.spring.initializr.support.ProjectAssert
import io.spring.initializr.test.ProjectAssert
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith

View File

@@ -1,6 +1,22 @@
/*
* Copyright 2012-2015 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.
*/
package io.spring.initializr.web
import io.spring.initializr.support.PomAssert
import io.spring.initializr.test.PomAssert
import org.junit.Test
import org.springframework.test.context.ActiveProfiles

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 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.
@@ -19,7 +19,7 @@ package io.spring.initializr.web
import java.nio.charset.Charset
import groovy.json.JsonSlurper
import io.spring.initializr.support.ProjectAssert
import io.spring.initializr.test.ProjectAssert
import org.json.JSONObject
import org.junit.Test
import org.skyscreamer.jsonassert.JSONAssert