Reformatted test
(1773)
@@ -49,6 +49,7 @@ class DocketSpec extends DocumentationContextSpec {
when:
plugin.configure(contextBuilder)
def pluginContext = contextBuilder.build()
+
then:
pluginContext.groupName == 'default'
pluginContext.securitySchemes == null
@@ -82,6 +83,7 @@ class DocketSpec extends DocumentationContextSpec {
and:
def pluginContext = contextBuilder.build()
+
then:
pluginContext.getGlobalResponseMessages()[GET][0].getMessage() == "blah"
pluginContext.getGlobalResponseMessages()[GET].size() == 1
@@ -107,6 +109,7 @@ class DocketSpec extends DocumentationContextSpec {
and:
def pluginContext = contextBuilder.build()
+
then:
pluginContext.getGlobalResponseMessages()[GET][0].getMessage() == "blah"
pluginContext.getGlobalResponseMessages()[GET].size() == 1
@@ -120,8 +123,10 @@ class DocketSpec extends DocumentationContextSpec {
new Docket(DocumentationType.SWAGGER_12)
.ignoredParameterTypes(AbstractSingletonProxyFactoryBean.class, ProxyFactoryBean.class)
.configure(contextBuilder)
+
and:
def pluginContext = contextBuilder.build()
+
then:
pluginContext.getIgnorableParameterTypes().contains(AbstractSingletonProxyFactoryBean.class)
pluginContext.getIgnorableParameterTypes().contains(ProxyFactoryBean.class)
@@ -136,6 +141,7 @@ class DocketSpec extends DocumentationContextSpec {
new Docket(DocumentationType.SWAGGER_12)
.alternateTypeRules(rule)
.configure(contextBuilder)
+
expect:
documentationContext().alternateTypeProvider.rules.contains(rule)
}
@@ -146,10 +152,12 @@ class DocketSpec extends DocumentationContextSpec {
.create(DocumentationType.SWAGGER_12)
def isjdk8 = System.getProperty("java.version").startsWith("1.8")
def jdk8RuleCount = (isjdk8 ? 6 : 0)
+
and:
new Docket(DocumentationType.SWAGGER_12)
."${method}"(*args)
.configure(swaggerDefault)
+
then:
swaggerDefault.build().alternateTypeProvider.rules.size() == expectedSize + jdk8RuleCount
@@ -188,6 +196,7 @@ class DocketSpec extends DocumentationContextSpec {
and:
def pluginContext = contextBuilder.build()
+
then:
"default" == pluginContext.groupName
null != pluginContext.pathProvider
