Skip to content

Commit 9266b6c

Browse files
author
stefan
committed
Testing #toString of Parameters (hierynomus#653)
1 parent 9e9797c commit 9266b6c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/net/schmizz/sshj/connection/channel/direct/ParametersTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static org.junit.Assert.assertEquals;
44
import static org.junit.Assert.assertFalse;
55
import static org.junit.Assert.assertNotEquals;
6+
import static org.junit.Assert.assertNotNull;
67
import static org.junit.Assert.assertNull;
78
import static org.junit.Assert.assertTrue;
89
import java.util.HashMap;
@@ -93,4 +94,15 @@ public void testHashMapApplicability() {
9394
assertNull(map.get(third));
9495
}
9596

97+
@Test
98+
public void testToString() {
99+
final Parameters first = new Parameters("127.0.0.1", 8080, "github.com", 443);
100+
assertNotNull(first.toString());
101+
assertFalse(first.toString().isBlank());
102+
assertTrue(first.toString().contains("127.0.0.1"));
103+
assertTrue(first.toString().contains("8080"));
104+
assertTrue(first.toString().contains("github.com"));
105+
assertTrue(first.toString().contains("443"));
106+
}
107+
96108
}

0 commit comments

Comments
 (0)