mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
23 lines
648 B
C++
23 lines
648 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_session session;
|
|
session.rpc = proxy;
|
|
wf_impl_operations_context context;
|
|
context.session = &session;
|
|
|
|
ASSERT_EQ(proxy, wf_impl_operations_context_get_proxy(&context));
|
|
}
|
|
|
|
TEST(wf_impl_operation_context, get_proxy_fail_no_session)
|
|
{
|
|
wf_impl_operations_context context;
|
|
context.session = nullptr;
|
|
|
|
ASSERT_EQ(nullptr, wf_impl_operations_context_get_proxy(&context));
|
|
|
|
} |