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

analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() — spring-boot Function Reference

Architecture documentation for the analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() function in MutuallyExclusiveConfigurationPropertiesFailureAnalyzerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9["analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis()"]
  ab6b1ce0_a57f_aa56_2dd9_2b936525a899["get()"]
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 -->|calls| ab6b1ce0_a57f_aa56_2dd9_2b936525a899
  2c630fd5_2829_3c98_d0b7_a054bda08e33["MutuallyExclusiveConfigurationPropertiesException()"]
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 -->|calls| 2c630fd5_2829_3c98_d0b7_a054bda08e33
  e638bb1b_7ade_7a52_c1d0_1018847097bf["performAnalysis()"]
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 -->|calls| e638bb1b_7ade_7a52_c1d0_1018847097bf
  1a4e5320_a2e2_8aa5_7d05_1e805db190f1["getAction()"]
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 -->|calls| 1a4e5320_a2e2_8aa5_7d05_1e805db190f1
  ebc7cdd4_21bc_3491_686c_090da262ca48["getDescription()"]
  f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 -->|calls| ebc7cdd4_21bc_3491_686c_090da262ca48
  style f3d5b6e5_add4_fbf5_6338_f3c1fa01d4e9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/MutuallyExclusiveConfigurationPropertiesFailureAnalyzerTests.java lines 70–90

	@Test
	void analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() {
		Map<String, Object> properties = new HashMap<>();
		properties.put("com.example.a", "alpha");
		properties.put("com.example.b", "bravo");
		MapPropertySource source = new MapPropertySource("test", properties);
		this.environment.getPropertySources().addFirst(OriginCapablePropertySource.get(source));
		MutuallyExclusiveConfigurationPropertiesException failure = new MutuallyExclusiveConfigurationPropertiesException(
				new HashSet<>(Arrays.asList("com.example.a", "com.example.b")),
				new HashSet<>(Arrays.asList("com.example.a", "com.example.b")));
		FailureAnalysis analysis = performAnalysis(failure);
		assertThat(analysis).isNotNull();
		assertThat(analysis.getAction()).isEqualTo(
				"Update your configuration so that only one of the mutually exclusive properties is configured.");
		assertThat(analysis.getDescription()).contains(String.format(
				"The following configuration properties are mutually exclusive:%n%n\tcom.example.a%n\tcom.example.b%n"))
			.contains(
					String.format("However, more than one of those properties has been configured at the same time:%n%n"
							+ "\tcom.example.a (originating from 'TestOrigin test')%n"
							+ "\tcom.example.b (originating from 'TestOrigin test')%n"));
	}

Domain

Subdomains

Frequently Asked Questions

What does analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() do?
analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() is a function in the spring-boot codebase.
What does analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() call?
analyzeWhenAllConfiguredPropertiesAreInTheEnvironmentShouldReturnAnalysis() calls 5 function(s): MutuallyExclusiveConfigurationPropertiesException, get, getAction, getDescription, performAnalysis.

Analyze Your Own Codebase

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

Try Supermodel Free