-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "SALOME_KernelServices.hxx"
#include "Basics_Utils.hxx"
+#include "KernelBasis.hxx"
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOME_TestComponent)
void KernelHelpersUnitTests::setUp()
{
+ setSSLMode(false);
}
// ============================================================================
CPPUNIT_ASSERT(!CORBA::is_nil(orb));
- SALOME_NamingService * ns = KERNEL::getNamingService();
+ SALOME_NamingService_Abstract * ns = KERNEL::getNamingService();
CPPUNIT_ASSERT(ns!=NULL);
SALOME_LifeCycleCORBA * lcc = KERNEL::getLifeCycleCORBA();
CPPUNIT_ASSERT( strcmp(coucou_res, coucou_ref) == 0 );
}
-void KernelHelpersUnitTests::TEST_getStudyManager() {
- SALOMEDS::StudyManager_var studyManager = KERNEL::getStudyManager();
-
- #ifndef ALLOW_MULTI_STUDIES
- SALOMEDS::ListOfOpenStudies_var _list_open_studies = studyManager->GetOpenStudies();
- for (unsigned int ind = 0; ind < _list_open_studies->length();ind++)
- {
- LOG("Close study : " << _list_open_studies[ind]);
- SALOMEDS::Study_var study = studyManager->GetStudyByName(_list_open_studies[0]);
- if(study)
- studyManager->Close(study);
- }
- #endif
-
- SALOMEDS::Study_ptr myTestStudy = studyManager->NewStudy(L"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() {
Engines::SalomeLauncher_var salomeLauncher = KERNEL::getSalomeLauncher();
try {
int pid = salomeLauncher->getPID();
+ SALOME_UNUSED(pid); // unused in release mode
LOG("SALOME launcher PID = " << pid);
}
catch (const SALOME::SALOME_Exception & ex) {