ContainerContentTests Class — spring-boot Architecture
Architecture documentation for the ContainerContentTests class in ContainerContentTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ContainerContentTests.java lines 32–72
class ContainerContentTests {
@Test
@SuppressWarnings("NullAway") // Test null check
void ofWhenArchiveIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> ContainerContent.of(null))
.withMessage("'archive' must not be null");
}
@Test
@SuppressWarnings("NullAway") // Test null check
void ofWhenDestinationPathIsNullThrowsException() {
TarArchive archive = mock(TarArchive.class);
assertThatIllegalArgumentException().isThrownBy(() -> ContainerContent.of(archive, null))
.withMessage("'destinationPath' must not be empty");
}
@Test
void ofWhenDestinationPathIsEmptyThrowsException() {
TarArchive archive = mock(TarArchive.class);
assertThatIllegalArgumentException().isThrownBy(() -> ContainerContent.of(archive, ""))
.withMessage("'destinationPath' must not be empty");
}
@Test
void ofCreatesContainerContent() {
TarArchive archive = mock(TarArchive.class);
ContainerContent content = ContainerContent.of(archive);
assertThat(content.getArchive()).isSameAs(archive);
assertThat(content.getDestinationPath()).isEqualTo("/");
}
@Test
void ofWithDestinationPathCreatesContainerContent() {
TarArchive archive = mock(TarArchive.class);
ContainerContent content = ContainerContent.of(archive, "/test");
assertThat(content.getArchive()).isSameAs(archive);
assertThat(content.getDestinationPath()).isEqualTo("/test");
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free