35 #ifndef STAGE_TEST_TEST_NEXUS_H 36 #define STAGE_TEST_TEST_NEXUS_H 86 using CommandHandler = std::function<void(lib::diff::GenNode const&)>;
87 using StateMarkHandler = std::function<void(lib::idi::BareEntryID const&, lib::diff::GenNode const&)>;
97 template<
typename...ARGS>
102 template<
typename...ARGS>
105 template<
typename...ARGS>
109 static void prepareDiagnosticCommandHandler();
124 template<
typename...ARGS>
128 prepareDiagnosticCommandHandler();
148 template<
typename...ARGS>
155 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
157 .
arg(
string(DataCap(args))...);
171 template<
typename...ARGS>
176 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
180 .
beforeEvent(
"TestNexus",
"SUCCESS handling "+cmd);
191 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
194 .
beforeEvent(
"TestNexus",
"SUCCESS handling "+cmd);
Abstraction: a tangible element of the User Interface.
connection point at the UI-Bus.
Mock UI backbone for unit testing.
Support for verifying the occurrence of events from unit tests.
static void setCommandHandler(CommandHandler=CommandHandler())
install a closure (custom handler function) to deal with any command invocations encountered in the t...
Any copy and copy construction prohibited.
EventMatch & beforeCall(string match)
find a match for some function invocation after the current point of reference
Interface: a component to maintain persistent interface state.
Helper to log and verify the occurrence of events.
EventMatch & arg(ARGS const &...args)
refine filter to additionally require specific arguments
Generate fake commands with stub operations and the ability to verify invocation. ...
static Symbol prepareMockCmd()
Setup of test fixture: prepare a mocked Steam-Layer command, which accepts arguments with the denoted...
Attachment point to the UI-Bus.
Token or Atom with distinct identity.
Set of stub command operations.
static ctrl::StateManager & useMockStateManager()
install a standard handler for state mark messages, which is actually backed by a mock implementation...
Mix-Ins to allow or prohibit various degrees of copying and cloning.
EventMatch & beforeEvent(string match)
find a match for an "event" after the current point of reference
Lumiera GTK UI implementation root.
static bool wasInvoked(Symbol)
Test predicate: verify at least one actual invocation happened for the given commend, without matching any concrete arguments.
static bool wasBound(Symbol, ARGS const &...args)
Test predicate: verify by string match that the denoted command was actually bound against the given ...
Generic building block for tree shaped (meta)data structures.
static void setStateMarkHandler(StateMarkHandler=StateMarkHandler())
similar to the custom command handler this hook allows to install a closure to intercept any "state m...
Interface: handling of persistent interface state.
static void zombificate(ctrl::BusTerm &)
kill the given [BusTerm] and implant a dead terminal in place
Lumiera error handling (C++ interface).
static ctrl::BusTerm & testUI()
get a connection point to a UI backbone faked for test
EventMatch verifyMatch(string regExp) const
start a query to match with a regular expression
EventMatch & on(string targetID)
refine filter to additionally match the 'this' attribute