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

loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() — spring-boot Function Reference

Architecture documentation for the loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() function in ConfigurationPropertiesTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  9b8d4df2_feac_d450_15a8_6956e146fc00["loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind()"]
  05d207ba_cdfc_1f3b_359f_89b70a0aec4e["load()"]
  9b8d4df2_feac_d450_15a8_6956e146fc00 -->|calls| 05d207ba_cdfc_1f3b_359f_89b70a0aec4e
  4059dd29_3aaf_f9da_f1e8_24110d1f8475["getPeriod()"]
  9b8d4df2_feac_d450_15a8_6956e146fc00 -->|calls| 4059dd29_3aaf_f9da_f1e8_24110d1f8475
  e4022041_263f_a020_4470_e99f5f35c64f["getDuration()"]
  9b8d4df2_feac_d450_15a8_6956e146fc00 -->|calls| e4022041_263f_a020_4470_e99f5f35c64f
  0f2fb365_becc_e32e_ea54_a6d834ac6e69["getSize()"]
  9b8d4df2_feac_d450_15a8_6956e146fc00 -->|calls| 0f2fb365_becc_e32e_ea54_a6d834ac6e69
  style 9b8d4df2_feac_d450_15a8_6956e146fc00 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java lines 984–998

	@Test
	void loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() {
		MutablePropertySources sources = this.context.getEnvironment().getPropertySources();
		Map<String, Object> source = new HashMap<>();
		source.put("test.duration", "12");
		source.put("test.size", "13");
		source.put("test.period", "14");
		sources.addLast(new MapPropertySource("test", source));
		load(ConstructorParameterWithUnitConfiguration.class);
		ConstructorParameterWithUnitProperties bean = this.context
			.getBean(ConstructorParameterWithUnitProperties.class);
		assertThat(bean.getDuration()).isEqualTo(Duration.ofDays(12));
		assertThat(bean.getSize()).isEqualTo(DataSize.ofMegabytes(13));
		assertThat(bean.getPeriod()).isEqualTo(Period.ofYears(14));
	}

Domain

Subdomains

Frequently Asked Questions

What does loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() do?
loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() is a function in the spring-boot codebase.
What does loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() call?
loadWhenBindingToConstructorParametersWithCustomDataUnitShouldBind() calls 4 function(s): getDuration, getPeriod, getSize, load.

Analyze Your Own Codebase

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

Try Supermodel Free