RunicTestPlatformEvent record

Namespace Runic.Application.Testing in Runic.Application.Testing 0.23.0

public sealed record RunicTestPlatformEvent : IEquatable<RunicTestPlatformEvent>

Inherits or implements IEquatable.

One call the application made to its test platform fakes, read by a serve-only browser test.

Parameters

Sequence

The call's position, from 1, among the application's calls.

Service

The fake: fileDialogs, clipboard, messageBoxes, contextMenus, notifications, launcher or announcements; or script with the operation error when the application rejected a scripted line, with its message and line.

Operation

What was called, such as openFile, saveFile, commit, write or show.

Values

What the call carried, such as a dialog's title and outcome or a commit's file and base64 content; absent values are left out.

Constructors

RunicTestPlatformEvent

public RunicTestPlatformEvent(long Sequence, string Service, string Operation, IReadOnlyDictionary<string, string> Values)

One call the application made to its test platform fakes, read by a serve-only browser test.

Parameters

Sequence

The call's position, from 1, among the application's calls.

Service

The fake: fileDialogs, clipboard, messageBoxes, contextMenus, notifications, launcher or announcements; or script with the operation error when the application rejected a scripted line, with its message and line.

Operation

What was called, such as openFile, saveFile, commit, write or show.

Values

What the call carried, such as a dialog's title and outcome or a commit's file and base64 content; absent values are left out.

Properties

Operation

public string Operation { get; init; }

What was called, such as openFile, saveFile, commit, write or show.

Sequence

public long Sequence { get; init; }

The call's position, from 1, among the application's calls.

Service

public string Service { get; init; }

The fake: fileDialogs, clipboard, messageBoxes, contextMenus, notifications, launcher or announcements; or script with the operation error when the application rejected a scripted line, with its message and line.

Values

public IReadOnlyDictionary<string, string> Values { get; init; }

What the call carried, such as a dialog's title and outcome or a commit's file and base64 content; absent values are left out.

Methods

Get

public string? Get(string name)

A value, or null when the call did not carry it.

Parameters

name

The value's name.

Returns

The value.

GetBytes

public byte[]? GetBytes(string name)

A base64 value, such as a commit's content, decoded.

Parameters

name

The value's name.

Returns

The bytes, or null when the call did not carry the value.

GetText

public string? GetText(string name)

A base64 value decoded as UTF-8 text.

Parameters

name

The value's name.

Returns

The text, or null when the call did not carry the value.