7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for component factory"
10 #include <boost/test/unit_test.hpp>
22 using namespace boost;
61 BOOST_CHECK( cabstract_factory !=
nullptr );
62 BOOST_CHECK_EQUAL( cabstract_factory->factory_type_name() , std::string(
"CAbstract") );
64 Handle<Builder> cconcrete1_builder(cabstract_factory->get_child(
"cf3.common.CConcrete1" ));
65 BOOST_CHECK( cconcrete1_builder !=
nullptr );
66 BOOST_CHECK_EQUAL( cconcrete1_builder->builder_concrete_type_name() , std::string(
"CConcrete1") );
73 const std::string builder_name1 =
"cf3.mesh.neu.Reader";
74 BOOST_CHECK_EQUAL(Builder::extract_library_name(builder_name1),
"coolfluid_mesh_neu");
76 const std::string builder_name2 =
"cf3.UFEM.Test";
77 BOOST_CHECK_EQUAL(Builder::extract_library_name(builder_name2),
"coolfluid_ufem");
82 BOOST_AUTO_TEST_SUITE_END()
boost::python::object get_child(ComponentWrapper &self, const std::string &name)
BOOST_AUTO_TEST_CASE(get_factory)
Safe pointer to an object. This is the supported method for referring to components.
external boost library namespace
Helper class to create the Builder and place it in the factory.
~FactoryFixture()
common tear-down for each test case
Top-level namespace for coolfluid.
Handle< FactoryT< CBase > > get_factory()
FactoryFixture()
common setup for each test case
Most basic kernel library.