ConfigDataLocationNotFoundExceptionTests Class — spring-boot Architecture
Architecture documentation for the ConfigDataLocationNotFoundExceptionTests class in ConfigDataLocationNotFoundExceptionTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataLocationNotFoundExceptionTests.java lines 32–68
class ConfigDataLocationNotFoundExceptionTests {
private final Origin origin = mock(Origin.class);
private final ConfigDataLocation location = ConfigDataLocation.of("optional:test").withOrigin(this.origin);
private final ConfigDataLocationNotFoundException exception = new ConfigDataLocationNotFoundException(
this.location);
@Test
@SuppressWarnings("NullAway") // Test null check
void createWhenLocationIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> new ConfigDataLocationNotFoundException(null))
.withMessage("'location' must not be null");
}
@Test
void getLocationReturnsLocation() {
assertThat(this.exception.getLocation()).isSameAs(this.location);
}
@Test
void getOriginReturnsLocationOrigin() {
assertThat(this.exception.getOrigin()).isSameAs(this.origin);
}
@Test
void getReferenceDescriptionReturnsLocationString() {
assertThat(this.exception.getReferenceDescription()).isEqualTo("location 'optional:test'");
}
@Test
void getMessageReturnsMessage() {
assertThat(this.exception).hasMessage("Config data location 'optional:test' cannot be found");
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free