CHG: changed the return val from the tcp classes to string
This commit is contained in:
@@ -49,23 +49,23 @@ SCENARIO("A test scenario","[keywords]")
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
||||
auto msg1FromClient = server.getLatestMessage();
|
||||
LOG_S(INFO)<< *msg1FromClient.get();
|
||||
LOG_S(INFO)<< msg1FromClient;
|
||||
LOG_S(INFO)<< server.countClients();
|
||||
THEN("expecting something to happen")
|
||||
{
|
||||
REQUIRE(server.countClients() == 1 );
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
||||
REQUIRE(*msg1FromClient.get() == "hello server");
|
||||
REQUIRE(msg1FromClient == "hello server");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
||||
server.sendMessage(msg1);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
REQUIRE(*client.getLatestMessage().get() == msg1);
|
||||
REQUIRE(client.getLatestMessage() == msg1);
|
||||
|
||||
server.sendMessage(msg2);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
REQUIRE(*client.getLatestMessage().get() == msg2);
|
||||
REQUIRE(client.getLatestMessage() == msg2);
|
||||
|
||||
|
||||
} // THEN
|
||||
|
||||
Reference in New Issue
Block a user