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

bindShouldFailWithAccessToBoundProperties() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  95865569_4eb0_df1a_2861_76ba539f87cc["bindShouldFailWithAccessToBoundProperties()"]
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  725e97d2_341b_6665_84bc_9206c7185c54["put()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 725e97d2_341b_6665_84bc_9206c7185c54
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  0f6888bd_415c_a046_17eb_844b4cf7637e["bindAndExpectValidationError()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 0f6888bd_415c_a046_17eb_844b4cf7637e
  8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3
  e0c94b54_8f92_9ac1_f91d_4509b570abaf["getName()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| e0c94b54_8f92_9ac1_f91d_4509b570abaf
  19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78["of()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78
  0fc42192_9b0a_a3da_b92c_873e4b869194["toString()"]
  95865569_4eb0_df1a_2861_76ba539f87cc -->|calls| 0fc42192_9b0a_a3da_b92c_873e4b869194
  style 95865569_4eb0_df1a_2861_76ba539f87cc 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 112–124

	@Test
	void bindShouldFailWithAccessToBoundProperties() {
		MockConfigurationPropertySource source = new MockConfigurationPropertySource();
		source.put("foo.nested.name", "baz");
		source.put("foo.nested.age", "4");
		source.put("faf.bar", "baz");
		this.sources.add(source);
		BindValidationException cause = bindAndExpectValidationError(() -> this.binder.bind(
				ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler));
		Set<ConfigurationProperty> boundProperties = cause.getValidationErrors().getBoundProperties();
		assertThat(boundProperties).extracting((p) -> p.getName().toString())
			.contains("foo.nested.age", "foo.nested.name");
	}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free