Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / Test / engineTest.hxx
1
2 #ifndef _ENGINETEST_HXX_
3 #define _ENGINETEST_HXX_
4
5 #include "ComposedNode.hxx"
6 #include "TypeCode.hxx"
7
8 #include <cppunit/extensions/HelperMacros.h>
9 #include <string>
10 #include <map>
11
12 namespace YACS
13 {
14   class EngineTest: public CppUnit::TestFixture
15   {
16     CPPUNIT_TEST_SUITE( EngineTest );
17     CPPUNIT_TEST(checkGetRuntime );
18     CPPUNIT_TEST(checkInGateOutGate );
19     CPPUNIT_TEST(checkNodePortNumber );
20     CPPUNIT_TEST(checkPortTypeName );
21     CPPUNIT_TEST(checkDuplicatePortName );
22     CPPUNIT_TEST(checkRemovePort );
23     CPPUNIT_TEST(checkAddNodesToBloc );
24     CPPUNIT_TEST(checkAddingTwiceSameNodeInSameBloc );
25     CPPUNIT_TEST(checkAddingTwiceSameNodeInTwoBlocs );
26     CPPUNIT_TEST(checkRecursiveBlocs_NumberOfNodes );
27     CPPUNIT_TEST(checkRecursiveBlocs_NumberOfPorts );
28     CPPUNIT_TEST(checkPortNameInBloc );
29     CPPUNIT_TEST(checkGetNameOfPortNotInBloc );
30     CPPUNIT_TEST(RecursiveBlocs_multipleRecursion );
31     CPPUNIT_TEST_SUITE_END();
32       
33   public:
34       
35     void setUp();
36     void tearDown();
37       
38     void checkGetRuntime();
39     void checkInGateOutGate();
40     void checkNodePortNumber();
41     void checkPortTypeName();
42     void checkDuplicatePortName();
43     void checkRemovePort();
44     void checkAddNodesToBloc();
45     void checkAddingTwiceSameNodeInSameBloc();
46     void checkAddingTwiceSameNodeInTwoBlocs();
47     void checkRecursiveBlocs_NumberOfNodes();
48     void checkRecursiveBlocs_NumberOfPorts();
49     void checkPortNameInBloc();
50     void checkGetNameOfPortNotInBloc();
51     void RecursiveBlocs_multipleRecursion();
52       
53   protected:
54     static std::map<std::string, YACS::ENGINE::Node*> _nodeMap; 
55     static std::map<std::string, YACS::ENGINE::ComposedNode*> _compoMap;
56
57     static  YACS::ENGINE::TypeCode *_tc_bool;
58     static  YACS::ENGINE::TypeCode *_tc_int;
59     static  YACS::ENGINE::TypeCode *_tc_double;
60   private:
61
62   };
63
64 }
65
66 #endif