Get SpatialOS

Sites

Menu

TestLogDispatcher Class

Namespace: Improbable.Gdk.TestUtils
GDK package: TestUtils
Source

A ILogDispatcher implementation designed to be used in testing. This replaces the LogAssert approach with a more specialised one.

Inheritance

Improbable.Gdk.Core.ILogDispatcher

Notes

  • The expected usage is to use EnterExpectingScope() with a using block. This methods returns a Disposable object which you can mark logs as expected. When the object is disposed - it will assert against any logs.

Child types

ExpectingScope


Properties

Connection Source
Connection Connection { get; set; }

WorkerType Source
string WorkerType { get; set; }


Methods

HandleLog Source
void HandleLog(LogType type, LogEvent logEvent)

Parameters
EnterExpectingScope Source
ExpectingScope EnterExpectingScope()

Creates and returns an disposable ExpectingScope object. This is intended to be used with a using block.

Returns:
An ExpectingScope instance.

Exceptions:
  • InvalidOperationException : Throws if you already have an un-disposed ExpectingScope from this logger.
ExitExpectingScope Source
void ExitExpectingScope()

Dispose Source
void Dispose()

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums