Files
MoShiro/backend/tests/MoShiro.Backend.Tests/PlanTests.cs
T
justme 2e146d4da7
ci/woodpecker/push/main-amd64-build Pipeline was successful
refactor!: rename the project from Monitor to MoShiro [CI]
Namespaces, assemblies, solution, binaries, images, systemd units, config paths, environment variables, protocol methods and the Linux user are all renamed. Breaking: existing databases, node identities and installed units must be recreated.
2026-10-07 02:03:25 +08:00

25 lines
658 B
C#

using System.Text.Json;
using MoShiro.Backend.Application;
using MoShiro.Protocol;
namespace MoShiro.Backend.Tests;
public sealed class PlanTests
{
[Fact]
public void Plans_ComposeKnownCollectionPrimitives_AndTheirOverridesAreValid()
{
foreach (PlanSpec plan in Plans.All)
{
foreach (PhaseSpec phase in plan.Phases)
{
KindSpec kind = Kinds.Find(phase.Kind)!;
Assert.NotNull(kind);
Assert.True(ParamResolver.Resolve(kind.Params, phase.Overrides).IsValid, $"{plan.Id}/{phase.Kind}");
}
}
Assert.Null(Plans.Find("nope"));
}
}