Salome HOME
Updated copyright comment
[modules/kernel.git] / src / SALOMEDS / Test / SALOMEDSTest.cxx
1 // Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #include "SALOMEDSTest.hxx"
24
25 #include "utilities.h"
26 #include "OpUtil.hxx"
27 #include "SALOME_NamingService.hxx"
28 #include "SALOME_LifeCycleCORBA.hxx"
29
30 #include <iostream>
31 #include <fstream>
32 #include <string>
33 #include <vector>
34 #include <cstdlib>
35
36 #include "SALOMEDSClient.hxx"
37 #include "SALOMEDS_Study.hxx"
38 #include "SALOMEDS_SObject.hxx"
39
40
41
42 // ============================================================================
43 /*!
44  * Set up the environment
45  */
46 // ============================================================================
47  
48 void SALOMEDSTest::setUp()
49 {  
50   _orb = KERNEL::GetRefToORB();
51   SALOME_NamingService NS(_orb);
52   CORBA::Object_var obj = NS.Resolve( "/Study" );
53   _study = SALOMEDS::Study::_narrow( obj );
54
55   CPPUNIT_ASSERT( !CORBA::is_nil(_study) );
56 }
57
58 // ============================================================================
59 /*!
60  *  - delete trace classes
61  */
62 // ============================================================================
63
64 void SALOMEDSTest::tearDown()
65 {
66   _PTR(Study) study ( new SALOMEDS_Study(_study) );
67   if(study)
68     study->Clear();
69 }
70
71 #include "SALOMEDSTest_AttributeComment.cxx"
72 #include "SALOMEDSTest_AttributeDrawable.cxx"
73 #include "SALOMEDSTest_AttributeExpandable.cxx"
74 #include "SALOMEDSTest_AttributeExternalFileDef.cxx"
75 #include "SALOMEDSTest_AttributeFileType.cxx"
76 #include "SALOMEDSTest_AttributeFlags.cxx"
77 #include "SALOMEDSTest_AttributeGraphic.cxx"
78 #include "SALOMEDSTest_AttributeIOR.cxx"
79 #include "SALOMEDSTest_AttributeInteger.cxx"
80 #include "SALOMEDSTest_AttributeLocalID.cxx"
81 #include "SALOMEDSTest_AttributeName.cxx"
82 #include "SALOMEDSTest_AttributeOpened.cxx"
83 #include "SALOMEDSTest_AttributeParameter.cxx"
84 #include "SALOMEDSTest_AttributePersistentRef.cxx"
85 #include "SALOMEDSTest_AttributePixMap.cxx"
86 #include "SALOMEDSTest_AttributePythonObject.cxx"
87 #include "SALOMEDSTest_AttributeReal.cxx"
88 #include "SALOMEDSTest_AttributeSelectable.cxx"
89 #include "SALOMEDSTest_AttributeSequenceOfInteger.cxx"
90 #include "SALOMEDSTest_AttributeSequenceOfReal.cxx"
91 #include "SALOMEDSTest_AttributeStudyProperties.cxx"
92 #include "SALOMEDSTest_AttributeTableOfInteger.cxx"
93 #include "SALOMEDSTest_AttributeTableOfReal.cxx"
94 #include "SALOMEDSTest_AttributeTableOfString.cxx"
95 #include "SALOMEDSTest_AttributeTarget.cxx"
96 #include "SALOMEDSTest_AttributeTextColor.cxx"
97 #include "SALOMEDSTest_AttributeTextHighlightColor.cxx"
98 #include "SALOMEDSTest_AttributeTreeNode.cxx"
99 #include "SALOMEDSTest_AttributeUserID.cxx"
100 #include "SALOMEDSTest_ChildIterator.cxx"
101 #include "SALOMEDSTest_SComponent.cxx"
102 #include "SALOMEDSTest_SComponentIterator.cxx"
103 #include "SALOMEDSTest_SObject.cxx"
104 #include "SALOMEDSTest_Study.cxx"
105 #include "SALOMEDSTest_StudyBuilder.cxx"
106 #include "SALOMEDSTest_UseCase.cxx"
107
108
109 // ============================================================================
110 /*!
111  * Set up the environment
112  */
113 // ============================================================================
114  
115 void SALOMEDSTest_Embedded::setUp()
116 {  
117   _orb = KERNEL::GetRefToORB();
118   SALOME_NamingService NS(_orb);
119   CORBA::Object_var obj = NS.Resolve( "/Study_embedded" );
120   _study = SALOMEDS::Study::_narrow( obj );
121
122   CPPUNIT_ASSERT( !CORBA::is_nil(_study) );
123 }