mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 18:28:27 +02:00
Add WireMock.org RestClient (#631)
* wip... * x * . * . * . * r * 1.4.21-preview-02 * 1.4.21-preview-03 * . * usings * wip * . * ut * . * . * . * tests * . * comments * readme
This commit is contained in:
31
test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs
Normal file
31
test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user