44 #ifndef STAGE_TEST_TEST_NEXUS_H 45 #define STAGE_TEST_TEST_NEXUS_H 95 using CommandHandler = std::function<void(lib::diff::GenNode const&)>;
96 using StateMarkHandler = std::function<void(lib::idi::BareEntryID const&, lib::diff::GenNode const&)>;
106 template<
typename...ARGS>
111 template<
typename...ARGS>
114 template<
typename...ARGS>
118 static void prepareDiagnosticCommandHandler();
133 template<
typename...ARGS>
137 prepareDiagnosticCommandHandler();
157 template<
typename...ARGS>
164 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
166 .
arg(
string(DataCap(args))...);
180 template<
typename...ARGS>
185 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
189 .
beforeEvent(
"TestNexus",
"SUCCESS handling "+cmd);
200 .
verifyMatch(
"TestNexus.+HANDLING Command-Message for .+" +cmd)
203 .
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