package org.xbib.logging.test;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.xbib.logging.LogContext;

public abstract class AbstractTest {

    public AbstractTest() {
    }

    @BeforeEach
    public void addLogContext() {
        final LogContext context = LogContext.create();
        LogContext.setLogContextSelector(() -> context);
    }

    @AfterEach
    public void removeLogContext() {
        LogContext.setLogContextSelector(LogContext.DEFAULT_LOG_CONTEXT_SELECTOR);
    }
}
