1 package org.slf4j.impl;
2
3 import org.junit.Test;
4 import org.slf4j.MarkerFactory;
5 import org.slf4j.helpers.BasicMarkerFactory;
6
7 import static org.hamcrest.Matchers.is;
8 import static org.junit.Assert.assertEquals;
9 import static org.junit.Assert.assertSame;
10 import static org.junit.Assert.assertThat;
11
12 public class StaticMarkerBinderTests {
13
14 @Test
15 public void getMarkerFactory() throws Exception {
16 assertSame(BasicMarkerFactory.class, StaticMarkerBinder.SINGLETON.getMarkerFactory().getClass());
17 assertSame(StaticMarkerBinder.SINGLETON.getMarkerFactory(), StaticMarkerBinder.SINGLETON.getMarkerFactory());
18 }
19
20 @Test
21 public void getMarkerFactoryClassStr() throws Exception {
22 assertEquals("org.slf4j.helpers.BasicMarkerFactory", StaticMarkerBinder.SINGLETON.getMarkerFactoryClassStr());
23 }
24
25 @Test
26 public void getMarkerFactoryReturnsCorrectlyFromSlf4JLoggerFactory() {
27 assertThat(MarkerFactory.getIMarkerFactory(), is(StaticMarkerBinder.SINGLETON.getMarkerFactory()));
28 }
29 }