mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-12-06 14:56:34 +01:00
Fix DateTime in Response (#1514)
* Fix DateTime in Response * // Set the DateTime from the Response to the current DateTime --------- Co-authored-by: Stef Heyenrath <stef.heyenrath@apg.nl>
This commit is contained in:
1 parent
dd762f218b
commit
cb4503b1a6
15 files changed
+92
-23
No files matched your search
@@ -0,0 +1,29 @@
|
||||
// Copyright © WireMock.Net
|
||||
#if NET6_0_OR_GREATER
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using WireMock.Net.Testcontainers.Utils;
|
||||
|
||||
namespace WireMock.Net.Tests.Facts;
|
||||
|
||||
[ExcludeFromCodeCoverage]
|
||||
public sealed class RunOnDockerFact : FactAttribute
|
||||
{
|
||||
public RunOnDockerFact(
|
||||
[CallerFilePath] string? sourceFilePath = null,
|
||||
[CallerLineNumber] int sourceLineNumber = -1) : base(sourceFilePath, sourceLineNumber)
|
||||
{
|
||||
|
||||
OSPlatform currentPlatform;
|
||||
try
|
||||
{
|
||||
currentPlatform = TestcontainersUtils.GetImageOSAsync.Value.Result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Skip = $"Only run test when Docker is installed.";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -15,7 +15,19 @@ public sealed class RunOnDockerPlatformFact : FactAttribute
|
||||
[CallerFilePath] string? sourceFilePath = null,
|
||||
[CallerLineNumber] int sourceLineNumber = -1) : base(sourceFilePath, sourceLineNumber)
|
||||
{
|
||||
if (TestcontainersUtils.GetImageOSAsync.Value.Result != OSPlatform.Create(platform))
|
||||
|
||||
OSPlatform currentPlatform;
|
||||
try
|
||||
{
|
||||
currentPlatform = TestcontainersUtils.GetImageOSAsync.Value.Result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Skip = $"Only run test when Docker is installed.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentPlatform != OSPlatform.Create(platform))
|
||||
{
|
||||
Skip = $"Only run test when Docker OS Platform {platform} is used.";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user