1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.net.bsd;
19
20 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
21 import static org.junit.jupiter.api.Assertions.assertEquals;
22 import static org.junit.jupiter.api.Assertions.assertNull;
23
24 import java.io.IOException;
25 import java.io.InputStream;
26
27 import org.junit.jupiter.api.Test;
28
29
30
31
32 public class RCommandClientTest {
33
34 private RCommandClient newClient() {
35 return new RCommandClient();
36 }
37
38 @Test
39 public void testConstructor() {
40 assertDoesNotThrow(RCommandClient::new);
41 }
42
43 @Test
44 public void testDefaultPort() {
45 assertEquals(RCommandClient.DEFAULT_PORT, newClient().getDefaultPort());
46 }
47
48 @Test
49 public void testGetInputStream() throws IOException {
50 try (InputStream inputStream = newClient().getInputStream()) {
51 assertNull(inputStream);
52 }
53 }
54
55 }