Skip to content

Commit 566c687

Browse files
committed
use fixed header for integration tests
1 parent ea48415 commit 566c687

File tree

4 files changed

+49
-4
lines changed

4 files changed

+49
-4
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2020 the original authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.github.hauner.openapi.processor.spring
18+
19+
import com.github.hauner.openapi.spring.writer.java.HeaderWriter
20+
import com.github.hauner.openapi.test.ProcessorTestBase
21+
import com.github.hauner.openapi.test.TestSet
22+
import org.junit.BeforeClass
23+
24+
class EndToEndBase extends ProcessorTestBase {
25+
26+
EndToEndBase (TestSet testSet) {
27+
super (testSet)
28+
}
29+
30+
@BeforeClass
31+
static void setConstantHeaderWriterText () {
32+
// set a "fixed" header, we don't want moving version/date/time parts
33+
34+
HeaderWriter.HEADER = """\
35+
/*
36+
* DO NOT MODIFY - this class was auto generated by openapi-processor-spring
37+
*
38+
* test
39+
* time
40+
* https://docs.openapiprocessor.io/spring
41+
*/
42+
43+
"""
44+
}
45+
46+
}

src/testInt/groovy/com/github/hauner/openapi/processor/spring/ProcessorEndToEndTest.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package com.github.hauner.openapi.processor.spring
1818

1919
import com.github.hauner.openapi.core.parser.ParserType
2020
import com.github.hauner.openapi.spring.processor.SpringProcessor
21-
import com.github.hauner.openapi.test.ProcessorTestBase
2221
import com.github.hauner.openapi.test.TestSet
2322
import org.junit.Test
2423
import org.junit.runner.RunWith
@@ -28,7 +27,7 @@ import org.junit.runners.Parameterized
2827
* using Junit so IDEA adds a "<Click to see difference>" when using assertEquals().
2928
*/
3029
@RunWith(Parameterized)
31-
class ProcessorEndToEndTest extends ProcessorTestBase {
30+
class ProcessorEndToEndTest extends EndToEndBase {
3231

3332
@Parameterized.Parameters(name = "{0}")
3433
static Collection<TestSet> sources () {

src/testInt/groovy/com/github/hauner/openapi/processor/spring/ProcessorJimsFileSystemTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import org.junit.runners.Parameterized
3030
* using Junit so IDEA adds a "<Click to see difference>" when using assertEquals().
3131
*/
3232
@RunWith(Parameterized)
33-
class ProcessorJimsFileSystemTest extends ProcessorTestBase {
33+
class ProcessorJimsFileSystemTest extends EndToEndBase {
3434

3535
@Parameterized.Parameters(name = "{0}")
3636
static Collection<TestSet> sources () {

src/testInt/groovy/com/github/hauner/openapi/processor/spring/ProcessorPendingTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.junit.runners.Parameterized
2727

2828
//@Ignore
2929
@RunWith(Parameterized)
30-
class ProcessorPendingTest extends ProcessorTestBase {
30+
class ProcessorPendingTest extends EndToEndBase {
3131

3232
@Parameterized.Parameters(name = "{0}")
3333
static Collection<TestSet> sources () {

0 commit comments

Comments
 (0)