java-commons/commons-logging-slf4j/src/test/java/io/gitlab/jfronny/commons/test/SLFLogStrategyTest.java

21 lines
605 B
Java

package io.gitlab.jfronny.commons.test;
import io.gitlab.jfronny.commons.logging.HotSwappingDelegateLogger;
import io.gitlab.jfronny.commons.logging.slf4j.SLF4JLogger;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class SLFLogStrategyTest {
@BeforeEach
void prepare() {
HotSwappingDelegateLogger.updateStrategy(SLF4JLogger::new);
}
@Test
void testFactory() {
assertEquals(SLF4JLogger.class, HotSwappingDelegateLogger.forName("Joe").getDelegate().getClass());
}
}