Dataflow Runtime API  2.7.2.0
Static Public Member Functions | List of all members
unitTestHelper::ActivePartHelper Class Reference

Helper for sending messages to an active part. More...

#include <Imt.Base.Dff.UnitTest.Helper/ActivePartHelper.h>

Static Public Member Functions

static void sendSignal (imt::base::dff::activeparts::test::ChannelMockIn *const pChannelIn, const uint16_t protocolIdentifier)
 Sends a signal over the channelIn. More...
 
static void sendMessage (imt::base::dff::activeparts::test::ChannelMockIn *const pChannelIn, const uint16_t protocolIdentifier, const imt::base::core::serialization::SerializableIfc &pMessage)
 Sends a single message over the channelIn. More...
 
static void assertNoMessage (imt::base::dff::activeparts::test::ChannelMockOut *const channelOut)
 Check if no message was sent on the given output channel. More...
 
static void assertMessage (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, size_t pos, const uint16_t expectedProtocol)
 Check if the message at the given position has the given protocol identifier. More...
 
template<typename MessageType >
static void assertMessage (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, size_t pos, const uint16_t expectedProtocol, const MessageType &expectedMessage)
 Check if the message at the given position has the given protocol identifier and message data. More...
 
static void assertNextMessage (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, const uint16_t expectedProtocol)
 Check if the oldest message on the channel has the given protocol identifier. More...
 
template<typename MessageType >
static void assertNextMessage (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, const uint16_t expectedProtocol, const MessageType &expectedMessage)
 Check if the oldest message on the channel has the given protocol identifier and message data. More...
 
static void assertNextMessageAndPop (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, const uint16_t expectedProtocol)
 Check if the oldest message on the channel has the given protocol identifier and dequeues the message. More...
 
template<typename MessageType >
static void assertNextMessageAndPop (imt::base::dff::activeparts::test::ChannelMockOut *const pChannelOut, const uint16_t expectedProtocol, const MessageType &expectedMessage)
 Check if the oldest message on the channel has the given protocol identifier and message data and dequeues the message. More...
 

Detailed Description

Helper for sending messages to an active part.

Member Function Documentation

◆ assertMessage() [1/2]

static void unitTestHelper::ActivePartHelper::assertMessage ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
size_t  pos,
const uint16_t  expectedProtocol 
)
static

Check if the message at the given position has the given protocol identifier.

Parameters
pChannelOutThe channel to check for messages.
posThe message at the given position in the queue is checked.
expectedProtocolThe protocol identifier to verify.

◆ assertMessage() [2/2]

template<typename MessageType >
static void unitTestHelper::ActivePartHelper::assertMessage ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
size_t  pos,
const uint16_t  expectedProtocol,
const MessageType &  expectedMessage 
)
inlinestatic

Check if the message at the given position has the given protocol identifier and message data.

Parameters
pChannelOutThe channel to check for messages.
posThe message at the given position in the queue is checked.
expectedProtocolThe protocol identifier to verify.
expectedMessageThe message to verify against.

◆ assertNextMessage() [1/2]

static void unitTestHelper::ActivePartHelper::assertNextMessage ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
const uint16_t  expectedProtocol 
)
static

Check if the oldest message on the channel has the given protocol identifier.

Parameters
pChannelOutThe channel to check for messages.
expectedProtocolThe protocol identifier to verify.

◆ assertNextMessage() [2/2]

template<typename MessageType >
static void unitTestHelper::ActivePartHelper::assertNextMessage ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
const uint16_t  expectedProtocol,
const MessageType &  expectedMessage 
)
inlinestatic

Check if the oldest message on the channel has the given protocol identifier and message data.

Parameters
pChannelOutThe channel to check for messages.
expectedProtocolThe protocol identifier to verify.
expectedMessageThe message to verify against.

◆ assertNextMessageAndPop() [1/2]

static void unitTestHelper::ActivePartHelper::assertNextMessageAndPop ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
const uint16_t  expectedProtocol 
)
static

Check if the oldest message on the channel has the given protocol identifier and dequeues the message.

Parameters
pChannelOutThe channel to check for messages.
expectedProtocolThe protocol identifier to verify.

◆ assertNextMessageAndPop() [2/2]

template<typename MessageType >
static void unitTestHelper::ActivePartHelper::assertNextMessageAndPop ( imt::base::dff::activeparts::test::ChannelMockOut *const  pChannelOut,
const uint16_t  expectedProtocol,
const MessageType &  expectedMessage 
)
inlinestatic

Check if the oldest message on the channel has the given protocol identifier and message data and dequeues the message.

Parameters
pChannelOutThe channel to check for messages.
expectedProtocolThe protocol identifier to verify.
expectedMessageThe message to verify against.

◆ assertNoMessage()

static void unitTestHelper::ActivePartHelper::assertNoMessage ( imt::base::dff::activeparts::test::ChannelMockOut *const  channelOut)
static

Check if no message was sent on the given output channel.

Parameters
channelOutThe channel to check for messages.

◆ sendMessage()

static void unitTestHelper::ActivePartHelper::sendMessage ( imt::base::dff::activeparts::test::ChannelMockIn *const  pChannelIn,
const uint16_t  protocolIdentifier,
const imt::base::core::serialization::SerializableIfc pMessage 
)
static

Sends a single message over the channelIn.

Parameters
pChannelInThe passed message is send over this channel.
protocolIdentifierThe protocol identifier of the message.
pMessagethe message to be send.

◆ sendSignal()

static void unitTestHelper::ActivePartHelper::sendSignal ( imt::base::dff::activeparts::test::ChannelMockIn *const  pChannelIn,
const uint16_t  protocolIdentifier 
)
static

Sends a signal over the channelIn.

Parameters
pChannelInThe passed message is send over this channel.
protocolIdentifierThe protocol identifier of the signal.

The documentation for this class was generated from the following file: