33#include < filesystem>
44#include < string>
55#include < thread>
6- #include " modian/ipc/input_protocol_pipe_client.h"
6+
7+ #include " modian/common/infra/ipc/ipc_client_factory.h"
78
89namespace fs = std::filesystem;
910
@@ -58,25 +59,26 @@ class InkstoneIntegrationTest : public ::testing::Test {
5859};
5960
6061TEST_F (InkstoneIntegrationTest, DISABLED_ConnectAndInput) {
61- modian::brush::infra::ipc::input_protocol_pipe_client client;
62+ const std::string INPUT_PROTOCOL_PIPE_NAME = R"( \\.\pipe\modian_input_protocol_pipe)" ;
63+ auto client = modian::common::infra::ipc::ipc_client_factory::create_sync_ipc_client (INPUT_PROTOCOL_PIPE_NAME );
6264
63- std::string response = client. send_and_wait (" n" );
64- response = client. send_and_wait (" i" );
65+ std::string response = client-> sync_send (" n" );
66+ response = client-> sync_send (" i" );
6567 EXPECT_EQ (response, " C:你" );
6668
67- client. send_and_wait (" h" );
68- client. send_and_wait (" a" );
69- response = client. send_and_wait (" o" );
69+ client-> sync_send (" h" );
70+ client-> sync_send (" a" );
71+ response = client-> sync_send (" o" );
7072 EXPECT_EQ (response, " C:好" );
7173
7274
73- client. send_and_wait (" m" );
74- response = client. send_and_wait (" o" );
75+ client-> sync_send (" m" );
76+ response = client-> sync_send (" o" );
7577 EXPECT_EQ (response, " C:墨" );
7678
77- client. send_and_wait (" d" );
78- client. send_and_wait (" i" );
79- client. send_and_wait (" a" );
80- response = client. send_and_wait (" n" );
79+ client-> sync_send (" d" );
80+ client-> sync_send (" i" );
81+ client-> sync_send (" a" );
82+ response = client-> sync_send (" n" );
8183 EXPECT_EQ (response, " C:点" );
82- }
84+ }
0 commit comments