Move UDPTest

This commit is contained in:
Grzegorz Piwowarek
2016-10-25 17:11:25 +02:00
parent 89b50437be
commit c9f858ca32

View File

@@ -1,33 +0,0 @@
package com.baeldung.java.networking.udp;
import static org.junit.Assert.*;
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class UDPTest {
EchoClient client = null;
@Before
public void setup() throws IOException {
new EchoServer().start();
client = new EchoClient();
}
@Test
public void whenCanSendAndReceivePacket_thenCorrect1() {
String echo = client.sendEcho("hello server");
assertEquals("hello server", echo);
echo = client.sendEcho("server is working");
assertFalse(echo.equals("hello server"));
}
@After
public void tearDown() {
client.sendEcho("end");
client.close();
}
}