Salome HOME
Copyright update: 2016
[modules/yacs.git] / src / engine / Test / engineTest.hxx
1 // Copyright (C) 2006-2016  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(checkGraphAnalyser0);
63     CPPUNIT_TEST(checkGraphAnalyser1);
64     CPPUNIT_TEST(checkGraphAnalyser2);
65     CPPUNIT_TEST(checkGraphAnalyser3);
66     CPPUNIT_TEST(checkGraphAnalyser4);
67     CPPUNIT_TEST_SUITE_END();
68       
69   public:
70       
71     void setUp();
72     void tearDown();
73     void cleanUp();
74
75     void checkGetRuntime();
76     void checkAny1();
77     void checkSharedPtr();
78     void checkAny2();
79     void checkAny3();
80     void checkAny4();
81     void checkAny5();
82     void checkAny6();
83     void checkAny7();
84     void checkAny8();
85     void checkInGateOutGate();
86     void checkNodePortNumber();
87     void checkPortTypeName();
88     void checkDuplicatePortName();
89     void checkRemovePort();
90     void checkAddNodesToBloc();
91     void checkAddingTwiceSameNodeInSameBloc();
92     void checkAddingTwiceSameNodeInTwoBlocs();
93     void checkRecursiveBlocs_NumberOfNodes();
94     void checkRecursiveBlocs_NumberOfPorts();
95     void checkPortNameInBloc();
96     void checkGetNameOfPortNotInBloc();
97     void checkRemoveNode();
98     void RecursiveBlocs_multipleRecursion();
99     void RecursiveBlocs_removeNodes();
100     void checkLogger();
101     void checkGraphAnalyser0();
102     void checkGraphAnalyser1();
103     void checkGraphAnalyser2();
104     void checkGraphAnalyser3();
105     void checkGraphAnalyser4();
106   protected:
107     static std::map<std::string, YACS::ENGINE::Node*> _nodeMap; 
108     static std::map<std::string, YACS::ENGINE::ComposedNode*> _compoMap;
109
110     static  YACS::ENGINE::TypeCode *_tc_bool;
111     static  YACS::ENGINE::TypeCode *_tc_int;
112     static  YACS::ENGINE::TypeCode *_tc_double;
113   private:
114
115   };
116
117 }
118
119 #endif