Home / Function/ putWithArchiveContentShouldExecuteHttpPut() — spring-boot Function Reference

putWithArchiveContentShouldExecuteHttpPut() — spring-boot Function Reference

Architecture documentation for the putWithArchiveContentShouldExecuteHttpPut() function in HttpClientTransportTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  c7d75a3c_c8d5_cd21_ee0e_14205b93b867["putWithArchiveContentShouldExecuteHttpPut()"]
  674ffdc0_fae2_e6cd_cd20_ae283d48a4ca["givenClientWillReturnResponse()"]
  c7d75a3c_c8d5_cd21_ee0e_14205b93b867 -->|calls| 674ffdc0_fae2_e6cd_cd20_ae283d48a4ca
  c3a4185f_576a_befe_15db_be38c37c3f74["writeToString()"]
  c7d75a3c_c8d5_cd21_ee0e_14205b93b867 -->|calls| c3a4185f_576a_befe_15db_be38c37c3f74
  style c7d75a3c_c8d5_cd21_ee0e_14205b93b867 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 233–253

	@Test
	void putWithArchiveContentShouldExecuteHttpPut() 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_X_TAR,
				(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(-1);
			assertThat(entity.getContentType()).isEqualTo(APPLICATION_X_TAR);
			assertThat(entity.isStreaming()).isTrue();
			assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(entity::getContent);
			assertThat(writeToString(entity)).isEqualTo(content);
			assertThat(response.getContent()).isSameAs(this.content);
		}), isNull());
	}

Domain

Subdomains

Frequently Asked Questions

What does putWithArchiveContentShouldExecuteHttpPut() do?
putWithArchiveContentShouldExecuteHttpPut() is a function in the spring-boot codebase.
What does putWithArchiveContentShouldExecuteHttpPut() call?
putWithArchiveContentShouldExecuteHttpPut() 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