irccd  3.0.3
Protected Member Functions | Protected Attributes | List of all members
irccd::test::command_fixture Class Reference

Test fixture helper for transport commands. More...

#include <command_fixture.hpp>

Inheritance diagram for irccd::test::command_fixture:
irccd::test::irccd_fixture

Protected Member Functions

 command_fixture ()
 
auto request (nlohmann::json json) -> nlohmann::json
 
- Protected Member Functions inherited from irccd::test::irccd_fixture
 irccd_fixture ()
 

Protected Attributes

std::shared_ptr< mock_serverserver_
 Mock server object. More...
 
std::shared_ptr< mock_pluginplugin_
 Mock plugin object. More...
 
std::shared_ptr< mock_streamstream_
 The fake transport_client stream. More...
 
std::shared_ptr< daemon::transport_clientclient_
 Client sending request. More...
 
- Protected Attributes inherited from irccd::test::irccd_fixture
boost::asio::io_context ctx_
 Boost.Asio context. More...
 
daemon::bot bot_ {ctx_}
 Main irccd daemon. More...
 

Detailed Description

Test fixture helper for transport commands.

This fixture automatically adds a mock_server and mock_plugin named "test" and added to the respective services.

Constructor & Destructor Documentation

◆ command_fixture()

irccd::test::command_fixture::command_fixture ( )
protected

Constructor.

Member Function Documentation

◆ request()

auto irccd::test::command_fixture::request ( nlohmann::json  json) -> nlohmann::json
protected

Get result from irccd.

Parameters
jsonthe request
Returns
the json message sent (if any)

Member Data Documentation

◆ client_

std::shared_ptr<daemon::transport_client> irccd::test::command_fixture::client_
protected

Client sending request.

◆ plugin_

std::shared_ptr<mock_plugin> irccd::test::command_fixture::plugin_
protected

Mock plugin object.

◆ server_

std::shared_ptr<mock_server> irccd::test::command_fixture::server_
protected

Mock server object.

◆ stream_

std::shared_ptr<mock_stream> irccd::test::command_fixture::stream_
protected

The fake transport_client stream.


The documentation for this class was generated from the following file: