1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-09-30 22:10:45 +00:00
falk-werner_webfuse-provider/test/webfuse/tests/adapter/operation/test_context.cc
2020-06-12 22:53:42 +02:00

21 lines
583 B
C++

#include "webfuse/adapter/impl/operation/context.h"
#include "webfuse/adapter/impl/session.h"
#include <gtest/gtest.h>
TEST(wf_impl_operation_context, get_proxy)
{
wf_jsonrpc_proxy * proxy = reinterpret_cast<wf_jsonrpc_proxy*>(42);
wf_impl_operation_context context;
context.proxy = proxy;
ASSERT_EQ(proxy, wf_impl_operation_context_get_proxy(&context));
}
TEST(wf_impl_operation_context, get_proxy_fail_no_session)
{
wf_impl_operation_context context;
context.proxy = nullptr;
ASSERT_EQ(nullptr, wf_impl_operation_context_get_proxy(&context));
}