Version: 8.3.0
LifeCycleCORBATest Class Reference

#include <LifeCycleCORBATest.hxx>

Inheritance diagram for LifeCycleCORBATest:

Public Member Functions

void setUp ()
 Set Trace mecanism. More...
 
void tearDown ()
 
void testFindOrLoad_Component_LaunchContainer ()
 Check FindOrLoad_Component. More...
 
void testFindOrLoad_Component_SameInstance ()
 Check FindOrLoad_Component. More...
 
void testFindOrLoad_Component_PythonInCppContainer ()
 Check FindOrLoad_Component with Python Component on C++ Container load an engine, check that the CORBA object is not null. More...
 
void testFindOrLoad_Component_PythonSameInstance ()
 Check FindOrLoad_Component with Python Component on C++ Container. More...
 
void testFindOrLoad_Component_UnknownInCatalog ()
 Check FindOrLoad_Component with a component name not in catalog. More...
 
void testFindOrLoad_Component_LaunchContainerHostname ()
 Check FindOrLoad_Component with hostname given. More...
 
void testFindOrLoad_Component_SameContainer ()
 Check FindOrLoad_Component with and without local hostname given. More...
 
void testFindOrLoad_Component_UnknownMachine ()
 Check FindOrLoad_Component: check behaviour when ask for an unknown computer We must catch a Salome Exception with "unknown host" message. More...
 
void testFindOrLoad_Component_ParamsEmpty ()
 Check FindOrLoad_Component, empty params must give an instance. More...
 
void testFindOrLoad_Component_ParamsLocalContainer ()
 Check FindOrLoad_Component params = local container. More...
 
void testFindOrLoad_Component_ParamsContainerName ()
 Check FindOrLoad_Component params = containerName. More...
 
void testFindOrLoad_Component_RemoteComputer ()
 Check FindOrLoad_Component on remote computer. More...
 
void testFindOrLoad_Component_ParamsRemoteComputer ()
 Check FindOrLoad_Component with params on remote computer params empty except hostname. More...
 
void testFindOrLoad_Component_ParamsRemoteComputer2 ()
 Check FindOrLoad_Component with params on remote computer params empty except hostname and container_name. More...
 
void testgetLocalFile_localComputer ()
 Check SALOME_FileTransferCORBA on local machine. More...
 
void testgetLocalFile_remoteComputer ()
 Check SALOME_FileTransferCORBA on remote machine. More...
 

Protected Member Functions

std::string GetRemoteHost ()
 Check FindOrLoad_Component params = containerName. More...
 

Protected Attributes

CORBA::ORB_var _orb
 
SALOME_NamingService _NS
 

Private Member Functions

 CPPUNIT_TEST_SUITE (LifeCycleCORBATest)
 
 CPPUNIT_TEST (testFindOrLoad_Component_LaunchContainer)
 
 CPPUNIT_TEST (testFindOrLoad_Component_SameInstance)
 
 CPPUNIT_TEST (testFindOrLoad_Component_PythonInCppContainer)
 
 CPPUNIT_TEST (testFindOrLoad_Component_PythonSameInstance)
 
 CPPUNIT_TEST (testFindOrLoad_Component_UnknownInCatalog)
 
 CPPUNIT_TEST (testFindOrLoad_Component_LaunchContainerHostname)
 
 CPPUNIT_TEST (testFindOrLoad_Component_SameContainer)
 
 CPPUNIT_TEST (testFindOrLoad_Component_UnknownMachine)
 
 CPPUNIT_TEST (testFindOrLoad_Component_ParamsEmpty)
 
 CPPUNIT_TEST (testFindOrLoad_Component_ParamsLocalContainer)
 
 CPPUNIT_TEST (testFindOrLoad_Component_ParamsContainerName)
 
 CPPUNIT_TEST (testgetLocalFile_localComputer)
 
 CPPUNIT_TEST_SUITE_END ()
 
std::string _getTraceFileName ()
 

Member Function Documentation

std::string LifeCycleCORBATest::_getTraceFileName ( )
private

References Kernel_Utils::GetTmpDir().

Referenced by setUp().

LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_LaunchContainer  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_SameInstance  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_PythonInCppContainer  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_PythonSameInstance  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_UnknownInCatalog  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_LaunchContainerHostname  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_SameContainer  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_UnknownMachine  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_ParamsEmpty  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_ParamsLocalContainer  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testFindOrLoad_Component_ParamsContainerName  )
private
LifeCycleCORBATest::CPPUNIT_TEST ( testgetLocalFile_localComputer  )
private
LifeCycleCORBATest::CPPUNIT_TEST_SUITE ( LifeCycleCORBATest  )
private
LifeCycleCORBATest::CPPUNIT_TEST_SUITE_END ( )
private
void LifeCycleCORBATest::setUp ( )

Set Trace mecanism.

  • delete preexisting trace classes if any
  • set trace on file Get or initialize the orb Create a SALOME_NamingService instance

References _getTraceFileName(), _NS, _orb, ASSERT, PROTECTED_DELETE::deleteInstance(), SALOME_NamingService::init_orb(), LocalTraceBufferPool::instance(), SINGLETON_< TYPE >::Instance(), out, and traceFile.

void LifeCycleCORBATest::tearDown ( )
void LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainer ( )

Check FindOrLoad_Component.

  • get a local container (no hostname given), load an engine, check that the CORBA object is not null.
  • check narrow

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testFindOrLoad_Component_LaunchContainerHostname ( )

Check FindOrLoad_Component with hostname given.

  • get a local container : getHostName()/componentName, load an engine, check that the CORBA object is not null.
  • check narrow

References _NS, DEVTRACE, SALOME_LifeCycleCORBA::FindOrLoad_Component(), and Kernel_Utils::GetHostname().

void LifeCycleCORBATest::testFindOrLoad_Component_ParamsContainerName ( )
void LifeCycleCORBATest::testFindOrLoad_Component_ParamsEmpty ( )

Check FindOrLoad_Component, empty params must give an instance.

References _NS, SALOME_LifeCycleCORBA::FindOrLoad_Component(), and SALOME_LifeCycleCORBA::preSet().

void LifeCycleCORBATest::testFindOrLoad_Component_ParamsLocalContainer ( )
void LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer ( )
void LifeCycleCORBATest::testFindOrLoad_Component_ParamsRemoteComputer2 ( )
void LifeCycleCORBATest::testFindOrLoad_Component_PythonInCppContainer ( )

Check FindOrLoad_Component with Python Component on C++ Container load an engine, check that the CORBA object is not null.

  • check narrow

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testFindOrLoad_Component_PythonSameInstance ( )

Check FindOrLoad_Component with Python Component on C++ Container.

  • Call 2 times FindOrLoad_Component with the same parameters
  • check if we get the same engine

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testFindOrLoad_Component_RemoteComputer ( )

Check FindOrLoad_Component on remote computer.

References _NS, DEVTRACE, SALOME_LifeCycleCORBA::FindOrLoad_Component(), and GetRemoteHost().

void LifeCycleCORBATest::testFindOrLoad_Component_SameContainer ( )

Check FindOrLoad_Component with and without local hostname given.

We must get the same container, the same instance of component

References _NS, DEVTRACE, SALOME_LifeCycleCORBA::FindOrLoad_Component(), and Kernel_Utils::GetHostname().

void LifeCycleCORBATest::testFindOrLoad_Component_SameInstance ( )

Check FindOrLoad_Component.

  • Call 2 times FindOrLoad_Component with the same parameters
  • check if we get the same engine

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testFindOrLoad_Component_UnknownInCatalog ( )

Check FindOrLoad_Component with a component name not in catalog.

See list of catalog given to module catalog server. Here, we work with KERNEL_SRC/resources/KERNELCatalog.xml that contains only KERNEL, SalomeTestComponent and SALOME_TestComponentPy

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testFindOrLoad_Component_UnknownMachine ( )

Check FindOrLoad_Component: check behaviour when ask for an unknown computer We must catch a Salome Exception with "unknown host" message.

References _NS, and SALOME_LifeCycleCORBA::FindOrLoad_Component().

void LifeCycleCORBATest::testgetLocalFile_localComputer ( )
void LifeCycleCORBATest::testgetLocalFile_remoteComputer ( )

Field Documentation

CORBA::ORB_var LifeCycleCORBATest::_orb
protected

Referenced by setUp().