Click or drag to resize
TestUtil Class
Provides utilities for unit testing BLPAPI applications.

This includes deserializing services from XML, creating test events, and appending/formatting messages in these events.

Inheritance Hierarchy
SystemObject
  Bloomberglp.Blpapi.TestTestUtil

Namespace:  Bloomberglp.Blpapi.Test
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.24.6.1
Syntax
public static class TestUtil

The TestUtil type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAppendMessage(Event, SchemaElementDefinition)
Creates a new message and appends it to the specified Event with default MessageProperties.
Public methodStatic memberAppendMessage(Event, SchemaElementDefinition, MessageProperties)
Creates a new message and appends it to the specified Event.
Public methodStatic memberCreateEvent
Creates and returns an Event to be used for testing with the specified EventEventType. The returned Event cannot be used for publishing. The behavior is undefined if EventFormatter is used with the returned Event.
Public methodStatic memberCreateTopic
Creates a valid Topic with the specified Service to support testing publishers.

The expected use case is to support returning a custom Topic while mocking GetTopic(Message) methods.

Public methodStatic memberDeserializeService(Stream)
Creates a Service from the specified stream.
Public methodStatic memberDeserializeService(String)
Creates a Service from the specified xml.
Public methodStatic memberGetAdminMessageDefinition
Gets the definition for an admin message of the specified messageName.
Top
See Also