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

bindWhenUsingNoUnboundElementsHandlerAndUnboundCollectionElementsWithInvalidPropertyShouldThrowException() — spring-boot Function Reference

Architecture documentation for the bindWhenUsingNoUnboundElementsHandlerAndUnboundCollectionElementsWithInvalidPropertyShouldThrowException() function in NoUnboundElementsBindHandlerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  81cd43ff_4953_0e98_6911_af0459a5c16b["bindWhenUsingNoUnboundElementsHandlerAndUnboundCollectionElementsWithInvalidPropertyShouldThrowException()"]
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  725e97d2_341b_6665_84bc_9206c7185c54["put()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| 725e97d2_341b_6665_84bc_9206c7185c54
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  bdf1886c_19f9_9cc1_5bff_886f1b1e2835["Binder()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| bdf1886c_19f9_9cc1_5bff_886f1b1e2835
  8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3
  19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78["of()"]
  81cd43ff_4953_0e98_6911_af0459a5c16b -->|calls| 19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78
  style 81cd43ff_4953_0e98_6911_af0459a5c16b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/handler/NoUnboundElementsBindHandlerTests.java lines 163–182

	@Test
	void bindWhenUsingNoUnboundElementsHandlerAndUnboundCollectionElementsWithInvalidPropertyShouldThrowException() {
		MockConfigurationPropertySource source1 = new MockConfigurationPropertySource();
		source1.put("example.nested[0].string-value", "bar");
		MockConfigurationPropertySource source2 = new MockConfigurationPropertySource();
		source2.put("example.nested[0].string-value", "bar");
		source2.put("example.nested[1].int-value", "1");
		source2.put("example.nested[1].invalid", "baz");
		this.sources.add(source1);
		this.sources.add(source2);
		this.binder = new Binder(this.sources);
		assertThatExceptionOfType(BindException.class).isThrownBy(() -> {
			assertThat(this.binder).isNotNull();
			this.binder.bind("example", Bindable.of(ExampleWithNestedList.class), new NoUnboundElementsBindHandler());
		}).satisfies((ex) -> {
			Throwable cause = ex.getCause();
			assertThat(cause).isNotNull();
			assertThat(cause.getMessage()).contains("The elements [example.nested[1].invalid] were left unbound");
		});
	}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free