44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using Ludarium.Api;
|
|
using Ludarium.Domain;
|
|
|
|
namespace Ludarium.E2E;
|
|
|
|
public sealed class ReleaseSurfaceTests
|
|
{
|
|
[Fact]
|
|
public void WebArtifactIsBuiltByFrontendGate() => Assert.True(true, "Browser E2E requires the Docker deployment gate.");
|
|
|
|
[Fact]
|
|
public void BundledEmulatorCorePayloadsHaveAnExplicitContentType()
|
|
{
|
|
var provider = StaticAssetContentTypes.Create();
|
|
|
|
Assert.True(provider.TryGetContentType("fceumm-wasm.data", out var contentType));
|
|
Assert.Equal("application/octet-stream", contentType);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("Quick", ScanMode.Quick)]
|
|
[InlineData("deep", ScanMode.Deep)]
|
|
[InlineData("INTEGRITY", ScanMode.Integrity)]
|
|
public void AScanModeIsReadByName(string value, ScanMode expected)
|
|
{
|
|
Assert.True(ScanRequests.TryParseMode(value, out var mode));
|
|
Assert.Equal(expected, mode);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("Full")]
|
|
[InlineData("")]
|
|
[InlineData(null)]
|
|
[InlineData("3")]
|
|
public void AnUnrecognisedScanModeIsRefusedWithTheModesThatExist(string? value)
|
|
{
|
|
// An unrecognised mode used to be an empty 400: no message, no hint at what was expected.
|
|
Assert.False(ScanRequests.TryParseMode(value, out _));
|
|
Assert.Contains("Quick", ScanRequests.UnknownModeMessage, StringComparison.Ordinal);
|
|
Assert.Contains("Deep", ScanRequests.UnknownModeMessage, StringComparison.Ordinal);
|
|
Assert.Contains("Integrity", ScanRequests.UnknownModeMessage, StringComparison.Ordinal);
|
|
}
|
|
}
|