Skip to content

Commit

Permalink
Add unittest for DomainParticipantFactory get_instance method (eProsi…
Browse files Browse the repository at this point in the history
…ma#1077)

* Refs #7968 Add unittest for DomainParticipantFactory get_instance method

Signed-off-by: AdolfoMartinez <[email protected]>

* Requested Changes

Signed-off-by: AdolfoMartinez <[email protected]>

* Refs #7968. Change tests order.

Signed-off-by: AdolfoMartinez <[email protected]>

Co-authored-by: AdolfoMartinez <[email protected]>
  • Loading branch information
lauramg15 and adolfomarver authored Apr 8, 2020
1 parent fc4aad0 commit b0ef464
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/unittest/dds/participant/ParticipantTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ namespace eprosima {
namespace fastdds {
namespace dds {

TEST(ParticipantTest, DomainParticipantFactoryGetInstance)
{
DomainParticipantFactory* factory = DomainParticipantFactory::get_instance();

ASSERT_NE(factory, nullptr);
ASSERT_EQ(factory, DomainParticipantFactory::get_instance());
}

TEST(ParticipantTests, CreateDomainParticipant)
{
DomainParticipant* participant = DomainParticipantFactory::get_instance()->create_participant(0);
Expand Down Expand Up @@ -138,4 +146,4 @@ int main(
{
testing::InitGoogleMock(&argc, argv);
return RUN_ALL_TESTS();
}
}

0 comments on commit b0ef464

Please sign in to comment.