Example #1
0
CORBA::Boolean TestDestroy::test(CosNaming::NamingContext_ptr context, 
                                 CORBA::Exception* expected_exception,
                                 const char* id, CORBA::Boolean print)
{
  if (print)
    cerr << "(" << id << ") TestDestroy " << endl; 
  
  if (context == NULL) {
    cerr << "Error: given context is null" << endl;
    return false;
  }
  
  try {
    
    context->destroy(); 
      
    
  } catch (const CORBA::Exception & e) {
    // TODO: check if cp and expected_exception RTTI types matches
  }

  if(print) {
    cerr << "(" << id << ") TestDestroy: OK!!" << endl;
  }
    
  return true;
}
 /*!
  * @if jp
  * @brief NamingContext を非アクティブ化する
  * @else
  * @brief Destroy the naming context
  * @endif
  */
 void CorbaNaming::destroy(CosNaming::NamingContext_ptr context)
   throw (SystemException, NotEmpty)
 {
   context->destroy();
 }