Files
WireMock.Net/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs
Stef Heyenrath cb66c04199 Add WireMock.org RestClient (#631)
* wip...

* x

* .

* .

* .

* r

* 1.4.21-preview-02

* 1.4.21-preview-03

* .

* usings

* wip

* .

* ut

* .

* .

* .

* tests

* .

* comments

* readme
2021-09-16 14:35:08 +02:00

31 lines
821 B
C#

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();
}
}
}