Home / Function/ bindShouldFailWithAccessToNameAndValue() — spring-boot Function Reference

bindShouldFailWithAccessToNameAndValue() — spring-boot Function Reference

Architecture documentation for the bindShouldFailWithAccessToNameAndValue() function in ValidationBindHandlerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  322caa42_72f7_2d19_b0b0_2dd1bade0865["bindShouldFailWithAccessToNameAndValue()"]
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  0f6888bd_415c_a046_17eb_844b4cf7637e["bindAndExpectValidationError()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| 0f6888bd_415c_a046_17eb_844b4cf7637e
  8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3
  e0c94b54_8f92_9ac1_f91d_4509b570abaf["getName()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| e0c94b54_8f92_9ac1_f91d_4509b570abaf
  19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78["of()"]
  322caa42_72f7_2d19_b0b0_2dd1bade0865 -->|calls| 19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78
  style 322caa42_72f7_2d19_b0b0_2dd1bade0865 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java lines 126–134

	@Test
	void bindShouldFailWithAccessToNameAndValue() {
		this.sources.add(new MockConfigurationPropertySource("foo.nested.age", "4"));
		BindValidationException cause = bindAndExpectValidationError(() -> this.binder.bind(
				ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler));
		assertThat(cause.getValidationErrors().getName()).hasToString("foo.nested");
		assertThat(cause.getMessage()).contains("nested.age");
		assertThat(cause.getMessage()).contains("rejected value [4]");
	}

Domain

Subdomains

Frequently Asked Questions

What does bindShouldFailWithAccessToNameAndValue() do?
bindShouldFailWithAccessToNameAndValue() is a function in the spring-boot codebase.
What does bindShouldFailWithAccessToNameAndValue() call?
bindShouldFailWithAccessToNameAndValue() calls 6 function(s): MockConfigurationPropertySource, add, bind, bindAndExpectValidationError, getName, of.

Analyze Your Own Codebase

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

Try Supermodel Free