You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
741 B
27 lines
741 B
4 years ago
|
#include "webfuse_provider/webfuse_provider.h"
|
||
|
#include "webfuse_provider/test_util/webfuse_server.hpp"
|
||
|
#include "webfuse_provider/mocks/mock_provider_client.hpp"
|
||
|
#include "webfuse_provider/test_util/client.hpp"
|
||
|
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
using webfuse_test::WebfuseServer;
|
||
|
using webfuse_test::MockProviderClient;
|
||
|
using webfuse_test::Client;
|
||
|
|
||
|
TEST(Client, Connect)
|
||
|
{
|
||
|
MockProviderClient provider;
|
||
|
EXPECT_CALL(provider, OnConnected()).Times(1);
|
||
|
EXPECT_CALL(provider, OnDisconnected()).Times(1);
|
||
|
|
||
|
wfp_client_config * config = wfp_client_config_create();
|
||
|
provider.AttachTo(config);
|
||
|
|
||
|
WebfuseServer server;
|
||
|
Client client(config, server.GetUrl());
|
||
|
|
||
|
server.AwaitConnection();
|
||
|
|
||
|
wfp_client_config_dispose(config);
|
||
|
}
|