7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the ui NRoot class"
22 BOOST_AUTO_TEST_SUITE( uiCoreNBrowserSuite )
40 boost::shared_ptr< NRoot >
root(
new NRoot(
"Root") );
41 boost::shared_ptr< NGeneric > node1(
new NGeneric(
"Node1",
"MyFirstType"));
42 boost::shared_ptr< NGeneric > node2(
new NGeneric(
"Node2",
"MySecondType"));
49 root->add_node(node1);
50 root->add_node(node2);
53 BOOST_REQUIRE_NO_THROW( node = root->child_from_root(0) );
54 BOOST_CHECK_EQUAL( node->
name(), std::string(
"Node1") );
55 BOOST_CHECK_EQUAL( node->
component_type().toStdString(), std::string(
"MyFirstType") );
58 BOOST_REQUIRE_NO_THROW( node = root->child_from_root(1) );
59 BOOST_CHECK_EQUAL( node->
name(), std::string(
"Node2") );
60 BOOST_CHECK_EQUAL( node->
component_type().toStdString(), std::string(
"MySecondType") );
66 BOOST_AUTO_TEST_SUITE_END()
QApplication * application()
Safe pointer to an object. This is the supported method for referring to components.
bool AssertionThrows
assertions throw exceptions
bool ExceptionOutputs
if exception contructor should output
static AssertionManager & instance()
Gets the instance of the manager.
Basic Classes for client-core library used by coolfluid-client application.
bool AssertionDumps
assertions dump backtraces
bool ExceptionDumps
if exception contructor should dump backtrace
QString component_type() const
const std::string & name() const
Access the name of the component.
Top-level namespace for coolfluid.
BOOST_AUTO_TEST_CASE(init)
static ExceptionManager & instance()
Gets the instance of the manager.
Client root. This class is wrapper for cf3::common::Root class on the client side. A NRoot object may never have any child. Add them to the internal Root componenent instead. It can be obtained by calling root() method.
Client generic component.
Most basic kernel library.