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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 @Test
public void missingOptionalPathParameter() throws IOException { public void missingOptionalPathParameter() throws IOException {
this.snippets.expectPathParameters() this.snippets.expectPathParameters().withContents(
.withContents(tableWithTitleAndHeader( tableWithTitleAndHeader(getTitle("/{a}"), "Parameter", "Description")
getTitle("/{a}"), .row("`a`", "one").row("`b`", "two"));
"Parameter", "Description").row("`a`", "one").row("`b`", "two"));
new PathParametersSnippet(Arrays.asList(parameterWithName("a").description("one"), new PathParametersSnippet(Arrays.asList(parameterWithName("a").description("one"),
parameterWithName("b").description("two").optional())) parameterWithName("b").description("two").optional()))
.document(this.operationBuilder.attribute( .document(this.operationBuilder.attribute(
@@ -98,10 +97,9 @@ public class PathParametersSnippetTests extends AbstractSnippetTests {
@Test @Test
public void presentOptionalPathParameter() throws IOException { public void presentOptionalPathParameter() throws IOException {
this.snippets.expectPathParameters() this.snippets.expectPathParameters().withContents(
.withContents(tableWithTitleAndHeader( tableWithTitleAndHeader(getTitle("/{a}"), "Parameter", "Description")
getTitle("/{a}"), .row("`a`", "one"));
"Parameter", "Description").row("`a`", "one"));
new PathParametersSnippet( new PathParametersSnippet(
Arrays.asList(parameterWithName("a").description("one").optional())) Arrays.asList(parameterWithName("a").description("one").optional()))
.document(this.operationBuilder.attribute( .document(this.operationBuilder.attribute(