diff --git a/src/gui/interact/invocation-trail.hpp b/src/gui/interact/invocation-trail.hpp index 1d585475c..de4e27532 100644 --- a/src/gui/interact/invocation-trail.hpp +++ b/src/gui/interact/invocation-trail.hpp @@ -104,6 +104,12 @@ namespace interact { return GenNode(cmdID_, RESERVED_FOR_FUTURE_USE_); } + string + getID() const + { + return cmdID_; + } + operator string() const { return "InvocationTrail cmd(\""+cmdID_+"\""; diff --git a/tests/gui/bus-term-test.cpp b/tests/gui/bus-term-test.cpp index e45196016..c3dd6426c 100644 --- a/tests/gui/bus-term-test.cpp +++ b/tests/gui/bus-term-test.cpp @@ -39,8 +39,10 @@ using lib::idi::BareEntryID; using gui::test::MockElm; using lib::diff::GenNode; using lib::diff::Rec; +using lib::time::Time; using lib::time::TimeSpan; using lib::hash::LuidH; +using lib::HashVal; //using util::contains; @@ -175,7 +177,7 @@ namespace test { commandInvocation () { MARK_TEST_FUN - auto cmd = gui::test::Nexus::prepareMockCmd(); + auto cmd = gui::test::Nexus::prepareMockCmd(); MockElm mock("uiElm"); diff --git a/tests/gui/test/test-nexus.cpp b/tests/gui/test/test-nexus.cpp index 3c2e4ff57..aac7a0b9c 100644 --- a/tests/gui/test/test-nexus.cpp +++ b/tests/gui/test/test-nexus.cpp @@ -400,6 +400,20 @@ namespace test{ + bool + Nexus::canInvoke(Cmd cmd) + { + UNIMPLEMENTED ("verify the given command is already bound and ready for invocation"); + } + + bool + Nexus::wasInvoked (Cmd cmd) + { + UNIMPLEMENTED ("verify the given command was indeed invoked at least once"); + } + + + /** * @return a defunct BusTerm with up-link to [ZombieNexus] diff --git a/tests/gui/test/test-nexus.hpp b/tests/gui/test/test-nexus.hpp index 666530e66..2bb14e05e 100644 --- a/tests/gui/test/test-nexus.hpp +++ b/tests/gui/test/test-nexus.hpp @@ -93,9 +93,47 @@ namespace test{ static void setCommandHandler (CommandHandler =CommandHandler()); static void setStateMarkHandler (StateMarkHandler =StateMarkHandler()); + + + using Cmd = interact::InvocationTrail; + + template + static Cmd prepareMockCmd(); + + static bool canInvoke(Cmd); + static bool wasInvoked (Cmd); + + template + static bool wasBound (Cmd, ARGS const& ...args); + + template + static bool wasInvoked (Cmd, ARGS const& ...args); }; + template + inline interact::InvocationTrail + Nexus::prepareMockCmd() + { + UNIMPLEMENTED("pick up arbitrary types and fabricate a mock command accepting those types"); + } + + template + inline bool + Nexus::wasBound (Cmd cmd, ARGS const& ...args) + { + UNIMPLEMENTED("verify the denoted command was actually bound against the given concrete Arguments (String-match)"); + } + + template + inline bool + Nexus::wasInvoked (Cmd cmd, ARGS const& ...args) + { + UNIMPLEMENTED("verify the denoted command was indeed invoked and received the given concrete Arguments (String-match)"); + } + + + }} // namespace gui::test #endif /*GUI_TEST_TEST_NEXUS_H*/