Skip to content

Commit

Permalink
Some refactoring to spilt up javadoc tests.
Browse files Browse the repository at this point in the history
This allows us to avoid dependency pollution in ratpack-manual.
  • Loading branch information
johnrengelman authored and beckje01 committed Apr 7, 2018
1 parent 83c6325 commit 377535a
Show file tree
Hide file tree
Showing 57 changed files with 783 additions and 96 deletions.
@@ -0,0 +1,26 @@
/*
* Copyright 2018 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 ratpack.base

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {
@Override
String getProjectName() {
return "ratpack-base"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.consul

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-consul"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.core

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-core"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.dropwizard.metrics

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-dropwizard-metrics"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.exec

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-exec"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.groovy

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-groovy"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.guice

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-guice"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.h2

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-h2"
}
}
1 change: 1 addition & 0 deletions ratpack-handlebars/ratpack-handlebars.gradle
Expand Up @@ -22,6 +22,7 @@ dependencies {
compile project(":ratpack-guice")
compile('com.github.jknack:handlebars:4.0.6') {
exclude group: "org.slf4j", module: "slf4j-api"
exclude group: "org.apache.commons", module: "commons-lang3"
}
runtime commonDependencies.slf4j
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.handlebars

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-handlebars"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.hikari

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-hikari"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.hystrix

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-hystrix"
}
}
@@ -0,0 +1,27 @@
/*
* Copyright 2018 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 ratpack.jdbctx

import ratpack.test.internal.snippets.AbstractJavadocCodeSnippetTests

class JavadocCodeSnippetTests extends AbstractJavadocCodeSnippetTests {

@Override
String getProjectName() {
return "ratpack-jdbc-tx"
}
}
1 change: 1 addition & 0 deletions ratpack-manual/ratpack-manual.gradle
Expand Up @@ -49,6 +49,7 @@ dependencies {
exclude group: "org.slf4j", module: "slf4j-api"
exclude group: "com.google.inject", module: "guice"
exclude group: "org.apache.httpcomponents", module: "httpclient"
exclude group: "org.apache.commons", module: "commons-lang3"
exclude group: "com.fasterxml.jackson.core", module: "jackson-databind"
}
testCompile gradleTestKit()
Expand Down
Expand Up @@ -17,14 +17,14 @@
package ratpack.manual

import com.google.common.base.StandardSystemProperty
import ratpack.manual.snippets.CodeSnippetTestCase
import ratpack.manual.snippets.CodeSnippetTests
import ratpack.manual.snippets.executer.GradleSnippetExecuter
import ratpack.manual.snippets.executer.GroovySnippetExecuter
import ratpack.manual.snippets.executer.JavaSnippetExecuter
import ratpack.manual.snippets.executer.SnippetExecuter
import ratpack.test.internal.snippets.CodeSnippetTestCase
import ratpack.test.internal.snippets.CodeSnippetTests
import ratpack.test.internal.snippets.executer.GradleSnippetExecuter
import ratpack.test.internal.snippets.executer.GroovySnippetExecuter
import ratpack.test.internal.snippets.executer.JavaSnippetExecuter
import ratpack.test.internal.snippets.executer.SnippetExecuter
import ratpack.manual.snippets.extractor.ManualSnippetExtractor
import ratpack.manual.snippets.fixture.*
import ratpack.test.internal.snippets.fixture.*

class ManualCodeSnippetTests extends CodeSnippetTestCase {

Expand Down
Expand Up @@ -16,9 +16,9 @@

package ratpack.manual.snippets.extractor

import ratpack.manual.snippets.TestCodeSnippet
import ratpack.manual.snippets.executer.ExceptionTransformer
import ratpack.manual.snippets.executer.SnippetExecuter
import ratpack.test.internal.snippets.TestCodeSnippet
import ratpack.test.internal.snippets.executer.ExceptionTransformer
import ratpack.test.internal.snippets.executer.SnippetExecuter
import ratpack.util.RatpackVersion

import java.util.regex.Pattern
Expand Down

0 comments on commit 377535a

Please sign in to comment.