BLPAPI C++
3.24.4
|
#include <blpapi_testutil.h>
Public Types | |
typedef test::MessageProperties | MessageProperties |
Static Public Member Functions | |
static Event | createEvent (Event::EventType eventType) |
static MessageFormatter | appendMessage (Event &event, const SchemaElementDefinition &elementDef, const MessageProperties &properties=MessageProperties()) |
static Service | deserializeService (std::istream &stream) |
static void | serializeService (std::ostream &stream, const Service &service) |
static Topic | createTopic (const Service &service, bool isActive=true) |
static SchemaElementDefinition | getAdminMessageDefinition (const Name &messageName) |
This class provides a set of utility functions to allow SDK clients to create events/messages for unit-testing their applications.
|
static |
Creates a new message and appends it to the specified event
. Returns a MessageFormatter
to format the last appended message. The specified event
must be a test Event
created from TestUtil::createEvent()
. elementDef
is used to verify and encode the contents of the message and the specified properties
are used to set the metadata properties for the message. An exception is thrown if the method fails to append the message.
|
static |
Creates and returns an Event
to be used for testing with the specified eventType
. The returned Event
cannot be used for publishing. The behavior is undefined if EventFormatter
is used with the returned Event
.
|
static |
Creates a Service
object from the specified stream
. The format of the stream must be XML
. The stream should only contain ASCII characters without any embedded null
characters. Returns the Service
object on success or throws blpapi::Exception
on failure.
|
static |
Return the definition for an admin message of the specified messageName
.
|
static |
Serialize the specified service
into the specified stream
in XML
format. An exception is thrown if the service can't be serialized successfully.