|
|
@ -3,7 +3,7 @@ import org.junit.Test; |
|
|
|
import java.io.*; |
|
|
|
import java.net.*; |
|
|
|
|
|
|
|
public class ClientHandlerConstructorTest { |
|
|
|
public class TestClientHandlerConstructor { |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
@ -19,7 +19,11 @@ public class ClientHandlerConstructorTest { |
|
|
|
|
|
|
|
ClientHandler clientHandler = new ClientHandler(mockChatServer, mockSocket); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
Thread.sleep(1000); // Adjust the sleep duration as needed |
|
|
|
} catch (InterruptedException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
assertTrue(mockChatServer.getClients().contains(clientHandler)); |