This commit is contained in:
DOHA
2016-10-31 12:06:29 +02:00
parent a51049921a
commit c0c8d8690e
2 changed files with 1 additions and 34 deletions

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();
}
}