Home / Class/ DeferredLogsTests Class — spring-boot Architecture

DeferredLogsTests Class — spring-boot Architecture

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

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogsTests.java lines 32–61

class DeferredLogsTests {

	@Test
	void switchOverAllSwitchesLoggersWithOrderedOutput() {
		Log log1 = mock(Log.class);
		Log log2 = mock(Log.class);
		DeferredLogs loggers = new DeferredLogs();
		Log dlog1 = loggers.getLog(log1);
		Log dlog2 = loggers.getLog(log2);
		dlog1.info("a");
		dlog2.info("b");
		dlog1.info("c");
		dlog2.info("d");
		then(log1).shouldHaveNoInteractions();
		then(log2).shouldHaveNoInteractions();
		loggers.switchOverAll();
		InOrder ordered = inOrder(log1, log2);
		then(log1).should(ordered).info("a", null);
		then(log2).should(ordered).info("b", null);
		then(log1).should(ordered).info("c", null);
		then(log2).should(ordered).info("d", null);
		then(log1).shouldHaveNoMoreInteractions();
		then(log2).shouldHaveNoMoreInteractions();
		dlog1.info("e");
		dlog2.info("f");
		then(log1).should(ordered).info("e", null);
		then(log2).should(ordered).info("f", null);
	}

}

Analyze Your Own Codebase

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

Try Supermodel Free