Home / Class/ SystemEnvironmentOriginTests Class — spring-boot Architecture

SystemEnvironmentOriginTests Class — spring-boot Architecture

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

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/origin/SystemEnvironmentOriginTests.java lines 29–56

class SystemEnvironmentOriginTests {

	@Test
	@SuppressWarnings("NullAway") // Test null check
	void createWhenPropertyIsNullShouldThrowException() {
		assertThatIllegalArgumentException().isThrownBy(() -> new SystemEnvironmentOrigin(null))
			.withMessage("'property' must not be empty");
	}

	@Test
	void createWhenPropertyNameIsEmptyShouldThrowException() {
		assertThatIllegalArgumentException().isThrownBy(() -> new SystemEnvironmentOrigin(""))
			.withMessage("'property' must not be empty");
	}

	@Test
	void getPropertyShouldReturnProperty() {
		SystemEnvironmentOrigin origin = new SystemEnvironmentOrigin("FOO_BAR");
		assertThat(origin.getProperty()).isEqualTo("FOO_BAR");
	}

	@Test
	void toStringShouldReturnStringWithDetails() {
		SystemEnvironmentOrigin origin = new SystemEnvironmentOrigin("FOO_BAR");
		assertThat(origin).hasToString("System Environment Property \"FOO_BAR\"");
	}

}

Analyze Your Own Codebase

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

Try Supermodel Free