mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Echo Test Added
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7241 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
0f0c423480
commit
ae15ced813
1 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,9 @@ package org.jivesoftware.smackx.jingle.nat;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.net.SocketException;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
|
||||||
import org.jivesoftware.smack.test.SmackTestCase;
|
import org.jivesoftware.smack.test.SmackTestCase;
|
||||||
|
|
||||||
|
@ -54,6 +57,22 @@ public class TransportCandidateTest extends SmackTestCase {
|
||||||
assertEquals(candList.get(candList.size() - 1), candH);
|
assertEquals(candList.get(candList.size() - 1), candH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testEcho(){
|
||||||
|
TransportCandidate tc = new TransportCandidate("localhost",10222){
|
||||||
|
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
tc.addCandidateEcho();
|
||||||
|
assertTrue(tc.getCandidateEcho().test(InetAddress.getByName("localhost"),10020));
|
||||||
|
}
|
||||||
|
catch (SocketException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
catch (UnknownHostException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected int getMaxConnections() {
|
protected int getMaxConnections() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue