1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.classic.net;
15
16 import java.net.InetAddress;
17
18 import org.junit.jupiter.api.BeforeEach;
19 import org.junit.jupiter.api.Test;
20 import org.slf4j.LoggerFactory;
21
22 import ch.qos.logback.classic.LoggerContext;
23
24 import static org.junit.jupiter.api.Assertions.assertNotNull;
25
26
27
28
29
30
31 public class SSLSocketReceiverTest {
32
33 private SSLSocketReceiver remote = new SSLSocketReceiver();
34
35 @BeforeEach
36 public void setUp() throws Exception {
37 LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
38 remote.setContext(lc);
39 }
40
41 @Test
42 public void testUsingDefaultConfig() throws Exception {
43
44 remote.setRemoteHost(InetAddress.getLocalHost().getHostAddress());
45 remote.setPort(6000);
46 remote.start();
47 assertNotNull(remote.getSocketFactory());
48 }
49
50 }