TestLogDispatcher Class

Namespace: Improbable.Gdk.TestUtilsSource

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

Name
Description


Properties

Worker Source
Core.Worker Worker { 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()

Updated about a year ago


TestLogDispatcher Class


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.