Implemented a Client API blocking connect

This commit is contained in:
selva.andre
2012-07-19 22:11:20 +02:00
parent 51a6ea6164
commit 6d1d4a9bb1
5 changed files with 207 additions and 36 deletions
@@ -0,0 +1,32 @@
package org.dna.mqtt.moquette.server;
import java.io.IOException;
import org.apache.mina.core.service.IoConnector;
import org.dna.mqtt.moquette.client.Client;
import org.junit.Test;
/**
*
* @author andrea
*/
public class ServerIntegrationTest {
IoConnector connector;
protected void startServer() throws IOException {
new Server().startServer();
}
@Test
public void testSubscribe() throws IOException, InterruptedException {
startServer();
Client client = new Client("localhost", Server.PORT);
client.connect();
//TODO client.publish("/topic", what)
//TODO client.subscribe("/topic", callback)
client.close();
}
}