putWithJsonContentShouldExecuteHttpPut() — spring-boot Function Reference
Architecture documentation for the putWithJsonContentShouldExecuteHttpPut() function in HttpClientTransportTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD aa727c70_66f6_1dff_b93e_94e34914baa9["putWithJsonContentShouldExecuteHttpPut()"] 674ffdc0_fae2_e6cd_cd20_ae283d48a4ca["givenClientWillReturnResponse()"] aa727c70_66f6_1dff_b93e_94e34914baa9 -->|calls| 674ffdc0_fae2_e6cd_cd20_ae283d48a4ca c3a4185f_576a_befe_15db_be38c37c3f74["writeToString()"] aa727c70_66f6_1dff_b93e_94e34914baa9 -->|calls| c3a4185f_576a_befe_15db_be38c37c3f74 style aa727c70_66f6_1dff_b93e_94e34914baa9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/HttpClientTransportTests.java lines 211–231
@Test
void putWithJsonContentShouldExecuteHttpPut() throws Exception {
String content = "test";
givenClientWillReturnResponse();
given(this.entity.getContent()).willReturn(this.content);
given(this.response.getCode()).willReturn(200);
Response response = this.http.put(this.uri, APPLICATION_JSON,
(out) -> StreamUtils.copy(content, StandardCharsets.UTF_8, out));
then(this.client).should().executeOpen(any(HttpHost.class), assertArg((ThrowingConsumer<HttpPut>) (request) -> {
HttpEntity entity = request.getEntity();
assertThat(request).isInstanceOf(HttpPut.class);
assertThat(request.getUri()).isEqualTo(this.uri);
assertThat(entity.isRepeatable()).isFalse();
assertThat(entity.getContentLength()).isEqualTo(content.length());
assertThat(entity.getContentType()).isEqualTo(APPLICATION_JSON);
assertThat(entity.isStreaming()).isTrue();
assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(entity::getContent);
assertThat(writeToString(entity)).isEqualTo(content);
assertThat(response.getContent()).isSameAs(this.content);
}), isNull());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does putWithJsonContentShouldExecuteHttpPut() do?
putWithJsonContentShouldExecuteHttpPut() is a function in the spring-boot codebase.
What does putWithJsonContentShouldExecuteHttpPut() call?
putWithJsonContentShouldExecuteHttpPut() calls 2 function(s): givenClientWillReturnResponse, writeToString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free