Files
WireMock.Net-wiremock/test/WireMock.Net.Tests/Facts/RunOnDockerPlatformFact.cs
2024-12-31 18:24:29 +01:00

19 lines
509 B
C#

// Copyright © WireMock.Net
#if NET6_0_OR_GREATER
using System.Runtime.InteropServices;
using WireMock.Net.Testcontainers.Utils;
using Xunit;
namespace WireMock.Net.Tests.Facts;
public sealed class RunOnDockerPlatformFact : FactAttribute
{
public RunOnDockerPlatformFact(string platform)
{
if (TestcontainersUtils.GetImageOSAsync.Value.Result != OSPlatform.Create(platform))
{
Skip = $"Only run test when Docker OS Platform {platform} is used.";
}
}
}
#endif