From 9022965f942807b0cb6826b532e84496575a519e Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Thu, 26 Sep 2024 17:16:29 +0200 Subject: [PATCH] . --- .../WireMock.Net.TestcontainersExample/Program.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/WireMock.Net.TestcontainersExample/Program.cs b/examples/WireMock.Net.TestcontainersExample/Program.cs index c919c0e3..f9bf2498 100644 --- a/examples/WireMock.Net.TestcontainersExample/Program.cs +++ b/examples/WireMock.Net.TestcontainersExample/Program.cs @@ -1,5 +1,6 @@ // Copyright © WireMock.Net +using System.Runtime.InteropServices; using Newtonsoft.Json; using WireMock.Net.Testcontainers; @@ -10,7 +11,7 @@ internal class Program private static async Task Main(string[] args) { var original = Console.ForegroundColor; - + try { Console.ForegroundColor = ConsoleColor.Yellow; @@ -107,11 +108,19 @@ private static async Task TestAsync(string? image = null) { var builder = new WireMockContainerBuilder() .WithAdminUserNameAndPassword("x", "y") - // .WithMappings(@"C:\Dev\GitHub\WireMock.Net\examples\WireMock.Net.Console.NET6\__admin\mappings") .WithWatchStaticMappings(true) .WithAutoRemove(true) .WithCleanUp(true); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + builder = builder.WithMappings(@"C:\Dev\GitHub\WireMock.Net\examples\WireMock.Net.Console.NET6\__admin\mappings"); + } + else + { + builder = builder.WithMappings("./examples/WireMock.Net.Console.NET6/__admin/mappings"); + } + if (image != null) { builder = image switch