Skip to content

Commit e036f13

Browse files
committed
use reader & converter
1 parent 99430fd commit e036f13

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/test/groovy/com/github/hauner/openapi/spring/generatr/TypeMappingReaderExampleSpec.groovy renamed to src/test/groovy/com/github/hauner/openapi/spring/generatr/MappingExampleSpec.groovy

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@
1717
package com.github.hauner.openapi.spring.generatr
1818

1919
import spock.lang.Specification
20+
import spock.lang.Subject
21+
22+
class MappingExampleSpec extends Specification {
23+
24+
@Subject
25+
def reader = new MappingReader()
26+
27+
@Subject
28+
def converter = new MappingConverter()
2029

21-
class TypeMappingReaderExampleSpec extends Specification {
2230

2331
String yaml = """
2432
map:
@@ -73,8 +81,8 @@ map:
7381

7482
void "parses mapping yaml" () {
7583
when:
76-
def reader = new TypeMappingReader()
77-
def mappings = reader.read (yaml)
84+
def mapping = reader.read (yaml)
85+
def mappings = converter.convert (mapping)
7886

7987
then:
8088
mappings

0 commit comments

Comments
 (0)