Skip to content

Commit 41a8fff

Browse files
committed
run integration tests with both parsers
1 parent f859d4b commit 41a8fff

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

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

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.github.hauner.openapi.processor
1818

19+
import com.github.hauner.openapi.spring.parser.ParserType
1920
import org.junit.runner.RunWith
2021
import org.junit.runners.Parameterized
2122

@@ -26,25 +27,36 @@ import org.junit.runners.Parameterized
2627
@RunWith(Parameterized)
2728
class ProcessorEndToEndTest extends ProcessorTestBase {
2829

30+
static def testSets = [
31+
'endpoint-exclude',
32+
'no-response-content',
33+
'params-additional',
34+
'params-complex-data-types',
35+
'params-enum',
36+
'params-path-simple-data-types',
37+
'params-request-body',
38+
'params-request-body-multipart-form-data',
39+
'params-simple-data-types',
40+
'params-spring-pageable-mapping',
41+
'ref-into-another-file',
42+
'response-array-data-type-mapping',
43+
'response-complex-data-types',
44+
// 'response-content-multiple',
45+
'response-simple-data-types',
46+
'bean-validation'
47+
]
48+
2949
@Parameterized.Parameters(name = "{0}")
3050
static Collection<TestSet> sources () {
31-
return [
32-
new TestSet(name: 'endpoint-exclude'),
33-
new TestSet(name: 'no-response-content'),
34-
new TestSet(name: 'params-additional'),
35-
new TestSet(name: 'params-complex-data-types'),
36-
new TestSet(name: 'params-enum'),
37-
new TestSet(name: 'params-path-simple-data-types'),
38-
new TestSet(name: 'params-request-body'),
39-
new TestSet(name: 'params-request-body-multipart-form-data'),
40-
new TestSet(name: 'params-simple-data-types'),
41-
new TestSet(name: 'params-spring-pageable-mapping'),
42-
new TestSet(name: 'ref-into-another-file'),
43-
new TestSet(name: 'response-array-data-type-mapping'),
44-
new TestSet(name: 'response-complex-data-types'),
45-
new TestSet(name: 'response-simple-data-types'),
46-
new TestSet(name: 'bean-validation')
47-
]
51+
def swagger = testSets.collect {
52+
new TestSet (name: it, parser: ParserType.SWAGGER)
53+
}
54+
55+
def openapi4j = testSets.collect {
56+
new TestSet (name: it, parser: ParserType.OPENAPI4J)
57+
}
58+
59+
swagger + openapi4j
4860
}
4961

5062
ProcessorEndToEndTest (TestSet testSet) {

src/testInt/groovy/com/github/hauner/openapi/processor/TestSet.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TestSet {
2424

2525
@Override
2626
String toString () {
27-
name
27+
"${parser.name ().toLowerCase ()} - $name"
2828
}
2929

3030
}

0 commit comments

Comments
 (0)