Skip to main content

ApplicationOptions record

Optional settings for StartAsync: which build of the application to run, what settings and content files to give it, and how the isoplane command is found and stopped.

public record ApplicationOptions

Public Members​

namedescription
ApplicationOptions()The default constructor.
CliPath { get; init; }The isoplane command the test runs the application with. Defaults to isoplane, found on the PATH.
Configuration { get; init; }The build configuration of the application under test, Debug or Release. Defaults to Debug.
Content { get; init; }Files to give the application for this run, such as the templates or data files a test's expectations are written against. Empty by default.
DiagnosticLimitCharacters { get; init; }How many characters DiagnosticOutput keeps. Defaults to 16,384.
Settings { get; init; }Settings to give the application for this run, such as the connection string of a database the test started. Empty by default.
ShutdownTimeout { get; init; }How long DisposeAsync waits for the application to stop before stopping it by force. Defaults to 10 seconds.

Remarks​

Every property has a default that suits most tests, so set only what a test needs, in an object initializer. The two most often set are Settings and Configuration.

Examples​

var options = new ApplicationOptions
{
Settings = new Dictionary<string, string> { ["ConnectionStrings:Todos"] = connectionString }
};
await using var app = await IsoplaneApplication.StartAsync(projectDirectory, options);

See Also​