Lumiera  0.pre.03
»edit your freedom«
test-nexus.cpp File Reference

Go to the source code of this file.

Description

Implementation of a fake UI backbone for testing.

This compilation unit provides the actual setup for running a faked user interface from unit tests. Test code is assumed to access those features through the front-end, while the actual implementation instances are placed as singletons

This test setup will mostly treat messages similar to the real UI-Bus hub, with additional logging. Since the TestNexus runs as singleton, there is a single shared "nexus-log", which can be accessed or even cleared through the static front-end. But there is no connection to any core services, so neither commands nor state marks will be processed in any way. In case the unit tests need to integrate with or verify these handling operations, we provide the ability to install custom handler functions.

See also
abstract-tangible-test.cpp
BusTerm_test

Definition in file test-nexus.cpp.

#include "lib/error.hpp"
#include "lib/symbol.hpp"
#include "lib/itertools.hpp"
#include "test/test-nexus.hpp"
#include "lib/test/event-log.hpp"
#include "steam/control/command.hpp"
#include "stage/ctrl/nexus.hpp"
#include "stage/ctrl/state-recorder.hpp"
#include "lib/diff/mutation-message.hpp"
#include "lib/diff/gen-node.hpp"
#include "lib/idi/entry-id.hpp"
#include "lib/idi/genfunc.hpp"
#include "lib/depend.hpp"
#include "lib/format-string.hpp"
#include "lib/format-cout.hpp"
#include <string>
#include <deque>

Classes

class  SimulatedCommandHandler
 Compact diagnostic dummy command handler. More...
 
class  SimulatedStateManager
 
class  TestNexus
 
class  ZombieNexus
 

Typedefs

using BusHub = stage::ctrl::Nexus
 
using ID = lib::idi::BareEntryID
 

Variables

lib::Depend< SimulatedStateManager > stateManager
 
lib::Depend< TestNexus > testNexus
 singleton instance of the [TestNexus] used for rigging unit tests
 
lib::Depend< ZombieNexus > zombieNexus
 

Namespaces

 stage
 Lumiera GTK UI implementation root.