Salome HOME
Merge remote-tracking branch 'origin/master' into V9_dev
[modules/kernel.git] / src / KernelHelpers / Test / KernelHelpersUnitTests.cxx
index 3dba801342da32a7c78ff3516409c647e8b1b5cc..7aa3bc43601c82fd62002d188d0be441e46a9bda 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -40,7 +40,7 @@ void KernelHelpersUnitTests::setUp()
 
 // ============================================================================
 /*!
- *  - delete 
+ *  - delete
  */
 // ============================================================================
 
@@ -58,7 +58,7 @@ void KernelHelpersUnitTests::TEST_corba()
   CORBA::ORB_var orb = KERNEL::getORB();
   CPPUNIT_ASSERT(!CORBA::is_nil(orb));
 
-  
+
   SALOME_NamingService *  ns  = KERNEL::getNamingService();
   CPPUNIT_ASSERT(ns!=NULL);
 
@@ -69,7 +69,7 @@ void KernelHelpersUnitTests::TEST_corba()
 void KernelHelpersUnitTests::TEST_getLifeCycleCORBA() {
   Engines::EngineComponent_var component =
     KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" );
-  
+
   Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component);
   char * coucou_res = engine->Coucou(123.);
   const char * coucou_ref = "TestComponent_i : L = 123";
@@ -77,17 +77,16 @@ void KernelHelpersUnitTests::TEST_getLifeCycleCORBA() {
   CPPUNIT_ASSERT( strcmp(coucou_res, coucou_ref) == 0 );
 }
 
-void KernelHelpersUnitTests::TEST_getStudyManager() {
-  SALOMEDS::Study_ptr myTestStudy = KERNEL::getStudyManager()->NewStudy("kerneltest");
+void KernelHelpersUnitTests::TEST_getStudy() {
+  SALOMEDS::Study_ptr myTestStudy = KERNEL::getStudyServant();
   CPPUNIT_ASSERT(!CORBA::is_nil(myTestStudy));
 
   // One can use the study to store some general properties
   myTestStudy->SetString("material","wood");
   myTestStudy->SetReal("volume",3.23);
 
-  // The study is characterized by an ID
-  int myTestStudyId = myTestStudy->StudyId();
-  LOG("TestComponentImpl::testkernel: study id = "<<myTestStudyId);
+  // The study with properties was opened
+  LOG("TestComponentImpl::testkernel: study with properties was opened");
 }
 
 void KernelHelpersUnitTests::TEST_getSalomeLauncher() {