Home / Class/ WhitespaceThrowablePatternConverterTests Class — spring-boot Architecture

WhitespaceThrowablePatternConverterTests Class — spring-boot Architecture

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

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/WhitespaceThrowablePatternConverterTests.java lines 32–53

class WhitespaceThrowablePatternConverterTests {

	private final LogEventPatternConverter converter = WhitespaceThrowablePatternConverter
		.newInstance(new DefaultConfiguration(), new String[] {});

	@Test
	void noStackTrace() {
		LogEvent event = Log4jLogEvent.newBuilder().build();
		StringBuilder builder = new StringBuilder();
		this.converter.format(event, builder);
		assertThat(builder).isEmpty();
	}

	@Test
	void withStackTrace() {
		LogEvent event = Log4jLogEvent.newBuilder().setThrown(new Exception()).build();
		StringBuilder builder = new StringBuilder();
		this.converter.format(event, builder);
		assertThat(builder.toString()).startsWith(System.lineSeparator()).endsWith(System.lineSeparator());
	}

}

Analyze Your Own Codebase

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

Try Supermodel Free