513fa1aa16
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using System.Text.Json;
|
|
using Xunit;
|
|
|
|
namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Cluster;
|
|
|
|
/// <summary>
|
|
/// TDD smoke coverage for <see cref="CliRunner"/> and
|
|
/// <see cref="ClusterAvailability"/>. Confirms the subprocess runner can locate
|
|
/// the built <c>scadabridge.dll</c>, shell out through <c>dotnet</c>, and parse
|
|
/// the JSON the CLI prints to stdout. When the dev cluster / MSSQL is unreachable
|
|
/// the fact reports as Skipped (not Failed), matching the established
|
|
/// <c>ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests</c> idiom.
|
|
/// </summary>
|
|
[Collection("Playwright")]
|
|
public class CliRunnerSmokeTests
|
|
{
|
|
/// <summary>
|
|
/// <c>scadabridge site list</c> round-trips through the CLI and returns a
|
|
/// JSON document (the CLI emits a JSON array of sites in <c>--format json</c>).
|
|
/// </summary>
|
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
|
[SkippableFact]
|
|
public async Task SiteList_ReturnsJson()
|
|
{
|
|
Skip.IfNot(await ClusterAvailability.IsAvailableAsync(), ClusterAvailability.SkipReason);
|
|
using var doc = await CliRunner.RunJsonAsync("site", "list");
|
|
Assert.True(doc.RootElement.ValueKind is JsonValueKind.Array or JsonValueKind.Object);
|
|
}
|
|
}
|