Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 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.
Expand Down Expand Up @@ -44,6 +44,7 @@
* Tests for {@link RequestFieldsSnippet}.
*
* @author Andy Wilkinson
* @author Sungjun Lee
*/
public class RequestFieldsSnippetTests extends AbstractSnippetTests {

Expand Down Expand Up @@ -239,15 +240,15 @@ public void requestFieldsWithCustomDescriptorAttributes() throws IOException {
}

@Test
public void fieldWithExplictExactlyMatchingType() throws IOException {
public void fieldWithExplicitExactlyMatchingType() throws IOException {
new RequestFieldsSnippet(Arrays.asList(fieldWithPath("a").description("one").type(JsonFieldType.NUMBER)))
.document(this.operationBuilder.request("http://localhost").content("{\"a\": 5 }").build());
assertThat(this.generatedSnippets.requestFields())
.is(tableWithHeader("Path", "Type", "Description").row("`a`", "`Number`", "one"));
}

@Test
public void fieldWithExplictVariesType() throws IOException {
public void fieldWithExplicitVariesType() throws IOException {
new RequestFieldsSnippet(Arrays.asList(fieldWithPath("a").description("one").type(JsonFieldType.VARIES)))
.document(this.operationBuilder.request("http://localhost").content("{\"a\": 5 }").build());
assertThat(this.generatedSnippets.requestFields())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 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.
Expand Down Expand Up @@ -43,6 +43,7 @@
* Tests for {@link ResponseFieldsSnippet}.
*
* @author Andy Wilkinson
* @author Sungjun Lee
*/
public class ResponseFieldsSnippetTests extends AbstractSnippetTests {

Expand Down Expand Up @@ -224,15 +225,15 @@ public void responseFieldsWithCustomDescriptorAttributes() throws IOException {
}

@Test
public void fieldWithExplictExactlyMatchingType() throws IOException {
public void fieldWithExplicitExactlyMatchingType() throws IOException {
new ResponseFieldsSnippet(Arrays.asList(fieldWithPath("a").description("one").type(JsonFieldType.NUMBER)))
.document(this.operationBuilder.response().content("{\"a\": 5 }").build());
assertThat(this.generatedSnippets.responseFields())
.is(tableWithHeader("Path", "Type", "Description").row("`a`", "`Number`", "one"));
}

@Test
public void fieldWithExplictVariesType() throws IOException {
public void fieldWithExplicitVariesType() throws IOException {
new ResponseFieldsSnippet(Arrays.asList(fieldWithPath("a").description("one").type(JsonFieldType.VARIES)))
.document(this.operationBuilder.response().content("{\"a\": 5 }").build());
assertThat(this.generatedSnippets.responseFields())
Expand Down