mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
removed unused code
This commit is contained in:
parent
f12d3e99c0
commit
5a439f4ef9
@ -14,6 +14,7 @@ using webfuse_test::MockAdapterClientCallback;
|
|||||||
using webfuse_test::TimeoutWatcher;
|
using webfuse_test::TimeoutWatcher;
|
||||||
using testing::_;
|
using testing::_;
|
||||||
using testing::Invoke;
|
using testing::Invoke;
|
||||||
|
using testing::AnyNumber;
|
||||||
|
|
||||||
#define TIMEOUT (std::chrono::milliseconds(10 * 1000))
|
#define TIMEOUT (std::chrono::milliseconds(10 * 1000))
|
||||||
|
|
||||||
@ -161,21 +162,13 @@ TEST(AdapterClient, Authenticate)
|
|||||||
WsServer server(WF_PROTOCOL_NAME_PROVIDER_SERVER);
|
WsServer server(WF_PROTOCOL_NAME_PROVIDER_SERVER);
|
||||||
MockAdapterClientCallback callback;
|
MockAdapterClientCallback callback;
|
||||||
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_INIT, nullptr)).Times(1);
|
EXPECT_CALL(callback, Invoke(_, _, _)).Times(AnyNumber());
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_CREATED, nullptr)).Times(1);
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_GET_TLS_CONFIG, _)).Times(1);
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_CLEANUP, nullptr)).Times(1);
|
|
||||||
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_CONNECTED, nullptr)).Times(1);
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_DISCONNECTED, nullptr)).Times(1);
|
|
||||||
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_AUTHENTICATE_GET_CREDENTIALS, _)).Times(1)
|
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_AUTHENTICATE_GET_CREDENTIALS, _)).Times(1)
|
||||||
.WillOnce(Invoke(GetCredentials));
|
.WillOnce(Invoke(GetCredentials));
|
||||||
bool called = false;
|
bool called = false;
|
||||||
bool * p_called = &called;
|
|
||||||
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_AUTHENTICATED, nullptr)).Times(1)
|
EXPECT_CALL(callback, Invoke(_, WF_CLIENT_AUTHENTICATED, nullptr)).Times(1)
|
||||||
.WillOnce(Invoke([p_called] (wf_client *, int, void *) {
|
.WillOnce(Invoke([&called] (wf_client *, int, void *) mutable {
|
||||||
*p_called = true;
|
called = true;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
wf_client * client = wf_client_create(
|
wf_client * client = wf_client_create(
|
||||||
|
Loading…
Reference in New Issue
Block a user