mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-14 06:13:35 +01:00
* Add TIOBE + include SonarAnalyzer.CSharp * . * cp * Copyright © WireMock.Net * more fixes * fix * xpath * if (Matchers == null || !Matchers.Any()) * if (Matchers != null) * ? * . * .
33 lines
851 B
C#
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();
|
|
}
|
|
}
|
|
} |