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

withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() — spring-boot Function Reference

Architecture documentation for the withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() function in ConfigDataEnvironmentContributorsTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  44c16ce3_36a5_206d_3cc6_63b2b5b338a4["withProcessedImportsProvidesLocationResolverContextWithAccessToBinder()"]
  730ed957_3077_a3ff_a894_e77568ba75e7["TestConfigDataResource()"]
  44c16ce3_36a5_206d_3cc6_63b2b5b338a4 -->|calls| 730ed957_3077_a3ff_a894_e77568ba75e7
  5f0c1c36_012f_880d_d499_3a02c8f8dab2["getBinder()"]
  44c16ce3_36a5_206d_3cc6_63b2b5b338a4 -->|calls| 5f0c1c36_012f_880d_d499_3a02c8f8dab2
  8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"]
  44c16ce3_36a5_206d_3cc6_63b2b5b338a4 -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3
  87f0b21f_3955_8dcc_cc55_9c6321893f96["get()"]
  44c16ce3_36a5_206d_3cc6_63b2b5b338a4 -->|calls| 87f0b21f_3955_8dcc_cc55_9c6321893f96
  style 44c16ce3_36a5_206d_3cc6_63b2b5b338a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributorsTests.java lines 173–198

	@Test
	void withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() {
		MockPropertySource existingPropertySource = new MockPropertySource();
		existingPropertySource.setProperty("test", "springboot");
		ConfigDataEnvironmentContributor existingContributor = ConfigDataEnvironmentContributor
			.ofExisting(existingPropertySource, this.conversionService);
		this.importer = mock(ConfigDataImporter.class);
		List<ConfigDataLocation> locations = Collections.singletonList(LOCATION_1);
		MockPropertySource propertySource = new MockPropertySource();
		Map<ConfigDataResolutionResult, ConfigData> imported = new LinkedHashMap<>();
		imported.put(new ConfigDataResolutionResult(LOCATION_1, new TestConfigDataResource("a'"), false),
				new ConfigData(List.of(propertySource)));
		given(this.importer.resolveAndLoad(eq(this.activationContext), any(), any(), eq(locations)))
			.willReturn(imported);
		ConfigDataEnvironmentContributor contributor = ConfigDataEnvironmentContributor.ofInitialImport(LOCATION_1,
				this.conversionService);
		ConfigDataEnvironmentContributors contributors = new ConfigDataEnvironmentContributors(this.logFactory,
				this.bootstrapContext, Arrays.asList(existingContributor, contributor), this.conversionService,
				ConfigDataEnvironmentUpdateListener.NONE);
		contributors.withProcessedImports(this.importer, this.activationContext);
		then(this.importer).should()
			.resolveAndLoad(any(),
					assertArg((context) -> assertThat(context.getBinder().bind("test", String.class).get())
						.isEqualTo("springboot")),
					any(), any());
	}

Domain

Subdomains

Frequently Asked Questions

What does withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() do?
withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() is a function in the spring-boot codebase.
What does withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() call?
withProcessedImportsProvidesLocationResolverContextWithAccessToBinder() calls 4 function(s): TestConfigDataResource, bind, get, getBinder.

Analyze Your Own Codebase

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

Try Supermodel Free