mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
SDK: Add ctors to adopt existing DDS API objects
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "TopologyFixture.h"
|
||||
|
||||
#include <DDS/Topology.h>
|
||||
#include <DDS/Tools.h>
|
||||
#include <fairmq/sdk/Topology.h>
|
||||
#include <fairmq/Tools.h>
|
||||
|
||||
@@ -16,6 +17,18 @@ namespace {
|
||||
|
||||
using Topology = fair::mq::test::TopologyFixture;
|
||||
|
||||
TEST(Topology2, ConstructionWithNativeDdsApiObjects)
|
||||
{
|
||||
// This is only needed for this unit test
|
||||
fair::mq::sdk::DDSEnv env(CMAKE_CURRENT_BINARY_DIR);
|
||||
|
||||
// Example usage:
|
||||
dds::topology_api::CTopology nativeTopo(fair::mq::tools::ToString(SDK_TESTSUITE_SOURCE_DIR, "/test_topo.xml"));
|
||||
dds::tools_api::CSession nativeSession;
|
||||
nativeSession.create();
|
||||
fair::mq::sdk::Topology topo(nativeTopo, nativeSession, env);
|
||||
}
|
||||
|
||||
TEST_F(Topology, Construction)
|
||||
{
|
||||
fair::mq::sdk::Topology topo(mDDSTopo, mDDSSession);
|
||||
|
Reference in New Issue
Block a user