1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package net.sourceforge.acelogger.factory.test;
16
17 import java.util.List;
18
19 import org.testng.annotations.Test;
20
21 import net.sourceforge.acelogger.appender.Appender;
22 import net.sourceforge.acelogger.factory.AppenderFactory;
23
24 import static org.testng.Assert.assertTrue;
25
26
27
28
29
30
31
32
33 @Test
34 public class AppenderFactoryTest {
35
36 @Test
37 public void testSetNullAppender() {
38 List<Appender> previouslyRegistered = AppenderFactory.getRegisteredAppenders();
39 Appender register = AppenderFactory.registerAppender(null);
40 List<Appender> currentlyRegistered = AppenderFactory.getRegisteredAppenders();
41 assertTrue(register.equals(AppenderFactory.getDefaultAppender())
42 && currentlyRegistered.containsAll(previouslyRegistered)
43 && currentlyRegistered.size() == previouslyRegistered.size());
44 }
45
46 }