Home / Class/ BindValidationExceptionTests Class — spring-boot Architecture

BindValidationExceptionTests Class — spring-boot Architecture

Architecture documentation for the BindValidationExceptionTests class in BindValidationExceptionTests.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/BindValidationExceptionTests.java lines 31–47

class BindValidationExceptionTests {

	@Test
	@SuppressWarnings("NullAway") // Test null check
	void createWhenValidationErrorsIsNullShouldThrowException() {
		assertThatIllegalArgumentException().isThrownBy(() -> new BindValidationException(null))
			.withMessageContaining("'validationErrors' must not be null");
	}

	@Test
	void getValidationErrorsShouldReturnValidationErrors() {
		ValidationErrors errors = mock(ValidationErrors.class);
		BindValidationException exception = new BindValidationException(errors);
		assertThat(exception.getValidationErrors()).isEqualTo(errors);
	}

}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free