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

bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  4980050d_66b5_28e0_d830_c71055a0f1ca["bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException()"]
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  725e97d2_341b_6665_84bc_9206c7185c54["put()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| 725e97d2_341b_6665_84bc_9206c7185c54
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  bdf1886c_19f9_9cc1_5bff_886f1b1e2835["Binder()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| bdf1886c_19f9_9cc1_5bff_886f1b1e2835
  8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3
  19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78["of()"]
  4980050d_66b5_28e0_d830_c71055a0f1ca -->|calls| 19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78
  style 4980050d_66b5_28e0_d830_c71055a0f1ca 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 127–141

	@Test
	void bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() {
		MockConfigurationPropertySource source = new MockConfigurationPropertySource();
		source.put("example.foo[0]", "bar");
		this.sources.add(source);
		this.binder = new Binder(this.sources);
		assertThatExceptionOfType(BindException.class).isThrownBy(() -> {
			assertThat(this.binder).isNotNull();
			this.binder.bind("example", Bindable.of(Example.class), new NoUnboundElementsBindHandler());
		}).satisfies((ex) -> {
			Throwable cause = ex.getCause();
			assertThat(cause).isNotNull();
			assertThat(cause.getMessage()).contains("The elements [example.foo[0]] were left unbound");
		});
	}

Domain

Subdomains

Frequently Asked Questions

What does bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() do?
bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() is a function in the spring-boot codebase.
What does bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() call?
bindWhenUsingNoUnboundElementsHandlerAndUnboundListElementsShouldThrowException() 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