irccd
3.0.3
|
Test fixture for irccdctl frontend. More...
#include <cli_fixture.hpp>
Public Types | |
using | outputs = std::vector< std::string > |
using | result = std::tuple< int, outputs, outputs > |
Public Member Functions | |
cli_fixture (std::string irccdctl) | |
~cli_fixture () | |
void | start () |
auto | exec (const std::vector< std::string > &args) -> result |
Protected Attributes | |
daemon::bot | bot_ {service_} |
std::shared_ptr< mock_server > | server_ |
Test fixture for irccdctl frontend.
This class will run irccd daemon in a thread when member function start
is called.
Before starting the daemon, the test can manually modify irccd instance through bot_
member variable. Once started, call exec
with arguments you want to pass through irccdctl utility.
using irccd::test::cli_fixture::outputs = std::vector<std::string> |
Type for all lines printed.
using irccd::test::cli_fixture::result = std::tuple<int, outputs, outputs> |
Collection of output from stdout/stderr respectively.
irccd::test::cli_fixture::cli_fixture | ( | std::string | irccdctl | ) |
irccd::test::cli_fixture::~cli_fixture | ( | ) |
Stop irccd and close everything.
auto irccd::test::cli_fixture::exec | ( | const std::vector< std::string > & | args | ) | -> result |
void irccd::test::cli_fixture::start | ( | ) |
|
protected |
Irccd instance.
start()
has been called.
|
protected |
Server automatically added as "test".