Salome HOME
Revert "Synchronize adm files"
[modules/yacs.git] / src / engine / Test / engineTest.hxx
1 // Copyright (C) 2006-2014  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _ENGINETEST_HXX_
21 #define _ENGINETEST_HXX_
22
23 #include "ComposedNode.hxx"
24 #include "TypeCode.hxx"
25
26 #include <cppunit/extensions/HelperMacros.h>
27 #include <string>
28 #include <map>
29
30 namespace YACS
31 {
32   class EngineTest: public CppUnit::TestFixture
33   {
34     CPPUNIT_TEST_SUITE( EngineTest );
35     CPPUNIT_TEST(checkGetRuntime );
36     CPPUNIT_TEST(checkAny1);
37     CPPUNIT_TEST(checkSharedPtr);
38     CPPUNIT_TEST(checkAny2);
39     CPPUNIT_TEST(checkAny3);
40     CPPUNIT_TEST(checkAny4);
41     CPPUNIT_TEST(checkAny5);
42     CPPUNIT_TEST(checkAny6);
43     CPPUNIT_TEST(checkAny7);
44     CPPUNIT_TEST(checkAny8);
45     CPPUNIT_TEST(checkInGateOutGate );
46     CPPUNIT_TEST(checkNodePortNumber );
47     CPPUNIT_TEST(checkPortTypeName );
48     CPPUNIT_TEST(checkDuplicatePortName );
49     CPPUNIT_TEST(checkRemovePort );
50     CPPUNIT_TEST(checkAddNodesToBloc );
51     CPPUNIT_TEST(checkAddingTwiceSameNodeInSameBloc );
52     CPPUNIT_TEST(checkAddingTwiceSameNodeInTwoBlocs );
53     CPPUNIT_TEST(checkRecursiveBlocs_NumberOfNodes );
54     CPPUNIT_TEST(checkRecursiveBlocs_NumberOfPorts );
55     CPPUNIT_TEST(checkPortNameInBloc );
56     CPPUNIT_TEST(checkGetNameOfPortNotInBloc );
57     CPPUNIT_TEST(checkRemoveNode );
58     CPPUNIT_TEST(RecursiveBlocs_multipleRecursion );
59     CPPUNIT_TEST(RecursiveBlocs_removeNodes );
60     CPPUNIT_TEST(cleanUp);
61     CPPUNIT_TEST(checkLogger);
62     CPPUNIT_TEST_SUITE_END();
63       
64   public:
65       
66     void setUp();
67     void tearDown();
68     void cleanUp();
69
70     void checkGetRuntime();
71     void checkAny1();
72     void checkSharedPtr();
73     void checkAny2();
74     void checkAny3();
75     void checkAny4();
76     void checkAny5();
77     void checkAny6();
78     void checkAny7();
79     void checkAny8();
80     void checkInGateOutGate();
81     void checkNodePortNumber();
82     void checkPortTypeName();
83     void checkDuplicatePortName();
84     void checkRemovePort();
85     void checkAddNodesToBloc();
86     void checkAddingTwiceSameNodeInSameBloc();
87     void checkAddingTwiceSameNodeInTwoBlocs();
88     void checkRecursiveBlocs_NumberOfNodes();
89     void checkRecursiveBlocs_NumberOfPorts();
90     void checkPortNameInBloc();
91     void checkGetNameOfPortNotInBloc();
92     void checkRemoveNode();
93     void RecursiveBlocs_multipleRecursion();
94     void RecursiveBlocs_removeNodes();
95     void checkLogger();
96       
97   protected:
98     static std::map<std::string, YACS::ENGINE::Node*> _nodeMap; 
99     static std::map<std::string, YACS::ENGINE::ComposedNode*> _compoMap;
100
101     static  YACS::ENGINE::TypeCode *_tc_bool;
102     static  YACS::ENGINE::TypeCode *_tc_int;
103     static  YACS::ENGINE::TypeCode *_tc_double;
104   private:
105
106   };
107
108 }
109
110 #endif