diff --git a/tests/gui/bus-term-test.cpp b/tests/gui/bus-term-test.cpp index b408e34e4..664530cf1 100644 --- a/tests/gui/bus-term-test.cpp +++ b/tests/gui/bus-term-test.cpp @@ -26,22 +26,16 @@ #include "test/mock-elm.hpp" #include "lib/idi/entry-id.hpp" #include "lib/diff/gen-node.hpp" -//#include "gui/model/diagnostics.hpp" //#include "lib/util.hpp" -//#include #include -//#include -//#include using lib::idi::EntryID; using lib::idi::BareEntryID; using gui::test::MockElm; using lib::diff::GenNode; -//using boost::lexical_cast; //using util::contains; -//using std::string; using std::cout; using std::endl; @@ -75,7 +69,7 @@ namespace test { * - cast messages and error states downstream * - generic operating of interface states * - detaching on element destruction - * + * * @see AbstractTangible_test * @see gui::model::Tangible * @see gui::ctrl::BusTerm @@ -145,14 +139,14 @@ namespace test { CHECK (elmLog.verifyCall("doFlash").on("zeitgeist")); - // kill the zeitgeist and verify disconnection + // kill the zeitgeist and verify disconnectedness mock.kill(); CHECK (elmLog.verifyEvent("destroy","zeitgeist")); CHECK (nexusLog.verifyCall("routeDetach").on("TestNexus").arg(elmID) .beforeEvent("TestNexus", "removed route to bID-zeitgeist")); gui::test::Nexus::testUI().mark (elmID, GenNode("Flash", 88)); - CHECK (nexusLog.verify("remove route to bID-zeitgeist") + CHECK (nexusLog.verify("removed route to bID-zeitgeist") .beforeCall("mark").on("TestNexus").arg(elmID, "Flash") .beforeEvent("warn","discarding mark to unknown bID-zeitgeist")); CHECK (elmLog.ensureNot("Flash") diff --git a/tests/gui/test/mock-elm.hpp b/tests/gui/test/mock-elm.hpp index 32d814349..028c42eac 100644 --- a/tests/gui/test/mock-elm.hpp +++ b/tests/gui/test/mock-elm.hpp @@ -236,7 +236,7 @@ namespace test{ log_.destroy (getID().getSym()); Nexus::zombificate (this->uiBus_); - log_.event ("successfully connected to zombie bus"); + log_.event (string(getID()) + " successfully connected to zombie bus"); } diff --git a/tests/gui/test/test-nexus.cpp b/tests/gui/test/test-nexus.cpp index 66a9abd84..007ddfaa2 100644 --- a/tests/gui/test/test-nexus.cpp +++ b/tests/gui/test/test-nexus.cpp @@ -28,9 +28,17 @@ ** features through the [front-end](\ref gui::test::TestNexus), while the ** actual implementation instances are placed [as singletons](depend.hpp) ** - ** @todo initial draft and WIP-WIP-WIP as of 11/2015 + ** This test setup will mostly treat messages similar to the [real UI-Bus hub](nexus.hpp), + ** with additional [logging](\ref event-log.hpp). Since the TestNexus runs as singleton, + ** there is a single shared "nexus-log", which can be [accessed](test::Nexus::getLog) or + ** even [cleared](test::Nexus::startNewLog) through the [static front-end](test::Nexus). + ** But there is no connection to any [core services](\ref core-service.hpp), 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 abstract-tangible-test.cpp + ** @see BusTerm_test ** */ @@ -48,9 +56,7 @@ #include #include -//#include -//using std::map; using std::cerr; using std::endl; using std::string; @@ -230,7 +236,7 @@ namespace test{ }; } }; - + /** singleton instance of the [TestNexus] * used for rigging unit tests */ lib::Depend testNexus;