summaryrefslogtreecommitdiff
path: root/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp')
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp128
1 files changed, 0 insertions, 128 deletions
diff --git a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp b/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
deleted file mode 100644
index e37d0f209d..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#include "FunctionCallManagerTest.h"
-
-#include "FunctionCallManager.h"
-#include "SciServer.h"
-#include "FunctionSciMsg.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (FunctionCallManagerTest);
-
-
-void FunctionCallManagerTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpSciServer = new SciServer();
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::tearDown (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- delete (mpFunctionCallManager);
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::registerCallbackTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(1, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::receiveMsgTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- FunctionSciMsg functionSciMsg(mpFunctionCallManager);
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(functionSciMsg.getSpecializedSciMsgHeader().msg_id, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(3, &userFunction3) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setFunctionName failed",
- functionSciMsg.setFunctionName ("userFunction1") );
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg failed",
- mpFunctionCallManager->receiveMsg (functionSciMsg) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void userFunction1 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction2 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction3 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-