Dynamic lib selection and deployment
[anna.git] / example / diameter / launcher / testing / TestManager.hpp
index af40fbf..d1cc1c1 100644 (file)
@@ -40,7 +40,7 @@ namespace anna {
 class TestClock;
 class TestCase;
 class TestCaseStep;
-class RealmNode;
+class OriginHost;
 
 
 typedef std::map<unsigned int /* test case id */, TestCase*> test_pool_t;
@@ -62,6 +62,7 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto
     unsigned int a_sucessTcs;
 
   public:
+    StatSummary() { clear(); }
     void newTCState(const TestCase::State::_v beginState, const TestCase::State::_v endState) throw();
     void clear() throw();
     unsigned int getInProgressCount() const throw() { return a_inprogressTcs; }
@@ -96,9 +97,14 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto
   // Test timers
   timer_container a_timers;
 
+  // Test case identifiers:
   // Session-Id's
   std::map<std::string /* session id's */, TestCase*> a_sessionIdTestCaseMap; // stores used Session-Id values within a test case.
                                                                               // No other can use them, but a test case could use more than one.
+  // Subscriber's
+  std::map<std::string /* subscriber id's */, TestCase*> a_subscriberIdTestCaseMap; // stores used Subscriber-Id values within a test case.
+
+
 
   StatSummary a_statSummary; // general statistics
 
@@ -114,6 +120,7 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto
   public:
 
     void registerSessionId(const std::string &sessionId, const TestCase *testCase) throw(anna::RuntimeException);
+    void registerSubscriberId(const std::string &subscriberId, const TestCase *testCase) throw(anna::RuntimeException);
 
     int tests() const throw() { return a_testPool.size(); }
     void setTimerController(anna::timex::Engine *engine) throw() {  a_timeController = engine; }
@@ -162,8 +169,9 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto
 
     // Main logic
     TestCase *getTestCaseFromSessionId(const anna::DataBlock &message, std::string &sessionId) throw();
-    void receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException);
-    void receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException);
+    TestCase *getTestCaseFromSubscriberId(const anna::DataBlock &message, std::string &subscriberId) throw();
+    void receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException);
+    void receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException);
 
     anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
     std::string asXMLString() const throw();