Home / Class/ BundleContentNotWatchableFailureAnalyzerTests Class — spring-boot Architecture

BundleContentNotWatchableFailureAnalyzerTests Class — spring-boot Architecture

Architecture documentation for the BundleContentNotWatchableFailureAnalyzerTests class in BundleContentNotWatchableFailureAnalyzerTests.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/BundleContentNotWatchableFailureAnalyzerTests.java lines 31–61

class BundleContentNotWatchableFailureAnalyzerTests {

	@Test
	void shouldAnalyze() {
		FailureAnalysis failureAnalysis = performAnalysis(null);
		assertThat(failureAnalysis).isNotNull();
		assertThat(failureAnalysis.getDescription()).isEqualTo(
				"The content of 'name' is not watchable. Only 'file:' resources are watchable, but 'classpath:resource.pem' has been set");
		assertThat(failureAnalysis.getAction())
			.isEqualTo("Update your application to correct the invalid configuration:\n"
					+ "Either use a watchable resource, or disable bundle reloading by setting reload-on-update = false on the bundle.");
	}

	@Test
	void shouldAnalyzeWithBundle() {
		FailureAnalysis failureAnalysis = performAnalysis("bundle-1");
		assertThat(failureAnalysis).isNotNull();
		assertThat(failureAnalysis.getDescription()).isEqualTo(
				"The content of 'name' from bundle 'bundle-1' is not watchable'. Only 'file:' resources are watchable, but 'classpath:resource.pem' has been set");
	}

	private @Nullable FailureAnalysis performAnalysis(@Nullable String bundle) {
		BundleContentNotWatchableException failure = new BundleContentNotWatchableException(
				new BundleContentProperty("name", "classpath:resource.pem"));
		if (bundle != null) {
			failure = failure.withBundleName(bundle);
		}
		return new BundleContentNotWatchableFailureAnalyzer().analyze(failure);
	}

}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free