Files
WireMock.Net/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs
Stef Heyenrath 54edf0bebc Add link to TIOBE Index on main page + fix issues (#1137)
* Add TIOBE + include SonarAnalyzer.CSharp

* .

* cp

* Copyright © WireMock.Net

* more fixes

* fix

* xpath

* if (Matchers == null || !Matchers.Any())

* if (Matchers != null)

* ?

* .

* .
2024-07-18 18:06:04 +02:00

33 lines
851 B
C#

// Copyright © WireMock.Net
using System.IO;
using System.Linq;
using FluentAssertions;
using WireMock.Server;
using Xunit;
namespace WireMock.Net.Tests
{
public class WireMockServerImportWireMockOrgTests
{
// For for AppVeyor + OpenCover
private string GetCurrentFolder()
{
return Directory.GetCurrentDirectory();
}
[Fact]
public void WireMockServer_Admin_ReadStaticWireMockOrgMappingAndAddOrUpdate()
{
var server = WireMockServer.Start();
string path = Path.Combine(GetCurrentFolder(), "__admin", "mappings.org", "mapping1.json");
server.ReadStaticWireMockOrgMappingAndAddOrUpdate(path);
var mappings = server.Mappings.ToArray();
mappings.Should().HaveCount(1);
server.Stop();
}
}
}