Home / Class/ MethodValidationExcludeFilterTests Class — spring-boot Architecture

MethodValidationExcludeFilterTests Class — spring-boot Architecture

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

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/validation/beanvalidation/MethodValidationExcludeFilterTests.java lines 34–80

class MethodValidationExcludeFilterTests {

	@Test
	void byAnnotationWhenClassIsAnnotatedExcludes() {
		MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class);
		assertThat(filter.isExcluded(Annotated.class)).isTrue();
	}

	@Test
	void byAnnotationWhenClassIsNotAnnotatedIncludes() {
		MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class);
		assertThat(filter.isExcluded(Plain.class)).isFalse();
	}

	@Test
	void byAnnotationWhenSuperclassIsAnnotatedWithInheritedAnnotationExcludes() {
		MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class);
		assertThat(filter.isExcluded(AnnotatedSuperClass.class)).isTrue();
	}

	@Test
	void byAnnotationWithDirectSearchStrategyWhenSuperclassIsAnnotatedWithInheritedAnnotationIncludes() {
		MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class,
				SearchStrategy.DIRECT);
		assertThat(filter.isExcluded(AnnotatedSuperClass.class)).isFalse();
	}

	static class Plain {

	}

	@Indicator
	static class Annotated {

	}

	@Inherited
	@Retention(RetentionPolicy.RUNTIME)
	@interface Indicator {

	}

	static class AnnotatedSuperClass extends Annotated {

	}

}

Analyze Your Own Codebase

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

Try Supermodel Free