1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.net;
15
16 import org.junit.jupiter.api.Assertions;
17 import org.junit.jupiter.api.BeforeEach;
18 import org.junit.jupiter.api.Test;
19
20 import ch.qos.logback.core.net.mock.MockContext;
21 import ch.qos.logback.core.spi.PreSerializationTransformer;
22
23
24
25
26
27
28 public class AbstractSSLSocketAppenderTest {
29
30 private MockContext context = new MockContext();
31
32 private InstrumentedSSLSocketAppenderBase appender = new InstrumentedSSLSocketAppenderBase();
33
34 @BeforeEach
35 public void setUp() throws Exception {
36 appender.setContext(context);
37 }
38
39 @Test
40 public void testUsingDefaultConfig() throws Exception {
41
42
43 appender.start();
44 Assertions.assertNotNull(appender.getSocketFactory());
45 appender.stop();
46 }
47
48 private static class InstrumentedSSLSocketAppenderBase extends AbstractSSLSocketAppender<Object> {
49
50 @Override
51 protected void postProcessEvent(Object event) {
52 throw new UnsupportedOperationException();
53 }
54
55 @Override
56 protected PreSerializationTransformer<Object> getPST() {
57 throw new UnsupportedOperationException();
58 }
59
60 }
61 }