Polish "Consistently use ID-based equality check for TemplateFormat"

This commit is contained in:
Andy Wilkinson
2018-08-01 11:47:49 +01:00
parent d05f6cdb6a
commit d57fa02254
2 changed files with 7 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-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.

View File

@@ -85,10 +85,9 @@ public class PathParametersSnippetTests extends AbstractSnippetTests {
@Test
public void missingOptionalPathParameter() throws IOException {
this.snippets.expectPathParameters()
.withContents(tableWithTitleAndHeader(
getTitle("/{a}"),
"Parameter", "Description").row("`a`", "one").row("`b`", "two"));
this.snippets.expectPathParameters().withContents(
tableWithTitleAndHeader(getTitle("/{a}"), "Parameter", "Description")
.row("`a`", "one").row("`b`", "two"));
new PathParametersSnippet(Arrays.asList(parameterWithName("a").description("one"),
parameterWithName("b").description("two").optional()))
.document(this.operationBuilder.attribute(
@@ -98,10 +97,9 @@ public class PathParametersSnippetTests extends AbstractSnippetTests {
@Test
public void presentOptionalPathParameter() throws IOException {
this.snippets.expectPathParameters()
.withContents(tableWithTitleAndHeader(
getTitle("/{a}"),
"Parameter", "Description").row("`a`", "one"));
this.snippets.expectPathParameters().withContents(
tableWithTitleAndHeader(getTitle("/{a}"), "Parameter", "Description")
.row("`a`", "one"));
new PathParametersSnippet(
Arrays.asList(parameterWithName("a").description("one").optional()))
.document(this.operationBuilder.attribute(