1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32: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:
Thiago Camargo 2007-02-22 16:54:13 +00:00 committed by thiago
parent 0f0c423480
commit ae15ced813

View file

@ -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;
} }