DockerConnectionExceptionTests Class — spring-boot Architecture
Architecture documentation for the DockerConnectionExceptionTests class in DockerConnectionExceptionTests.java from the spring-boot codebase.
Entity Profile
Source Code
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/DockerConnectionExceptionTests.java lines 31–64
class DockerConnectionExceptionTests {
private static final String HOST = "docker://localhost/";
@Test
@SuppressWarnings("NullAway") // Test null check
void createWhenHostIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> new DockerConnectionException(null, null))
.withMessage("'host' must not be null");
}
@Test
@SuppressWarnings("NullAway") // Test null check
void createWhenCauseIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> new DockerConnectionException(HOST, null))
.withMessage("'cause' must not be null");
}
@Test
void createWithIOException() {
DockerConnectionException exception = new DockerConnectionException(HOST, new IOException("error"));
assertThat(exception.getMessage())
.contains("Connection to the Docker daemon at 'docker://localhost/' failed with error \"error\"");
}
@Test
void createWithLastErrorException() {
DockerConnectionException exception = new DockerConnectionException(HOST,
new IOException(new com.sun.jna.LastErrorException("root cause")));
assertThat(exception.getMessage())
.contains("Connection to the Docker daemon at 'docker://localhost/' failed with error \"root cause\"");
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free