1 // Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #include "SALOMEDSTest.hxx"
24 #include "SALOMEDS_StudyManager_i.hxx"
25 #include "utilities.h"
26 #include "Utils_SINGLETON.hxx"
27 #include "Utils_ORB_INIT.hxx"
28 #include "SALOME_NamingService.hxx"
29 #include "SALOME_LifeCycleCORBA.hxx"
37 #include "SALOMEDSClient.hxx"
38 #include "SALOMEDS_StudyManager_i.hxx"
39 #include "SALOMEDS_StudyManager.hxx"
40 #include "SALOMEDS_SObject.hxx"
45 // ============================================================================
47 * Set up the environment
49 // ============================================================================
51 void SALOMEDSTest::setUp()
56 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
57 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
58 _orb = init(argc , argv ) ;
59 SALOME_NamingService NS(_orb);
60 CORBA::Object_var obj = NS.Resolve( "/myStudyManager" );
61 _sm = SALOMEDS::StudyManager::_narrow( obj );
63 CPPUNIT_ASSERT( !CORBA::is_nil(_sm) );
66 // ============================================================================
68 * - delete trace classes
70 // ============================================================================
72 void SALOMEDSTest::tearDown()
74 _PTR(StudyManager) sm ( new SALOMEDS_StudyManager(_sm) );
75 vector<string> v = sm->GetOpenStudies();
76 for(int i = 0; i<v.size(); i++) {
77 _PTR(Study) study = sm->GetStudyByName(v[i]);
83 #include "SALOMEDSTest_AttributeComment.cxx"
84 #include "SALOMEDSTest_AttributeDrawable.cxx"
85 #include "SALOMEDSTest_AttributeExpandable.cxx"
86 #include "SALOMEDSTest_AttributeExternalFileDef.cxx"
87 #include "SALOMEDSTest_AttributeFileType.cxx"
88 #include "SALOMEDSTest_AttributeFlags.cxx"
89 #include "SALOMEDSTest_AttributeGraphic.cxx"
90 #include "SALOMEDSTest_AttributeIOR.cxx"
91 #include "SALOMEDSTest_AttributeInteger.cxx"
92 #include "SALOMEDSTest_AttributeLocalID.cxx"
93 #include "SALOMEDSTest_AttributeName.cxx"
94 #include "SALOMEDSTest_AttributeOpened.cxx"
95 #include "SALOMEDSTest_AttributeParameter.cxx"
96 #include "SALOMEDSTest_AttributePersistentRef.cxx"
97 #include "SALOMEDSTest_AttributePixMap.cxx"
98 #include "SALOMEDSTest_AttributePythonObject.cxx"
99 #include "SALOMEDSTest_AttributeReal.cxx"
100 #include "SALOMEDSTest_AttributeSelectable.cxx"
101 #include "SALOMEDSTest_AttributeSequenceOfInteger.cxx"
102 #include "SALOMEDSTest_AttributeSequenceOfReal.cxx"
103 #include "SALOMEDSTest_AttributeStudyProperties.cxx"
104 #include "SALOMEDSTest_AttributeTableOfInteger.cxx"
105 #include "SALOMEDSTest_AttributeTableOfReal.cxx"
106 #include "SALOMEDSTest_AttributeTableOfString.cxx"
107 #include "SALOMEDSTest_AttributeTarget.cxx"
108 #include "SALOMEDSTest_AttributeTextColor.cxx"
109 #include "SALOMEDSTest_AttributeTextHighlightColor.cxx"
110 #include "SALOMEDSTest_AttributeTreeNode.cxx"
111 #include "SALOMEDSTest_AttributeUserID.cxx"
112 #include "SALOMEDSTest_ChildIterator.cxx"
113 #include "SALOMEDSTest_SComponent.cxx"
114 #include "SALOMEDSTest_SComponentIterator.cxx"
115 #include "SALOMEDSTest_SObject.cxx"
116 #include "SALOMEDSTest_Study.cxx"
117 #include "SALOMEDSTest_StudyBuilder.cxx"
118 #include "SALOMEDSTest_StudyManager.cxx"
119 #include "SALOMEDSTest_UseCase.cxx"
122 // ============================================================================
124 * Set up the environment
126 // ============================================================================
128 void SALOMEDSTest_Embedded::setUp()
133 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
134 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
135 _orb = init(argc , argv ) ;
136 SALOME_NamingService NS(_orb);
137 CORBA::Object_var obj = NS.Resolve( "/myStudyManager_embedded" );
138 _sm = SALOMEDS::StudyManager::_narrow( obj );
140 CPPUNIT_ASSERT( !CORBA::is_nil(_sm) );