mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-29 22:02:16 +02:00
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||||||
using NFluent;
|
using NFluent;
|
||||||
using RestEase;
|
using RestEase;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
|
using WireMock.Admin.Settings;
|
||||||
using WireMock.Client;
|
using WireMock.Client;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
@@ -27,6 +28,32 @@ namespace WireMock.Net.Tests
|
|||||||
Check.That(settings).IsNotNull();
|
Check.That(settings).IsNotNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task IFluentMockServerAdmin_PostSettingsAsync()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var server = FluentMockServer.StartWithAdminInterface();
|
||||||
|
var api = RestClient.For<IFluentMockServerAdmin>(server.Urls[0]);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var settings = new SettingsModel();
|
||||||
|
var status = await api.PostSettingsAsync(settings);
|
||||||
|
Check.That(status.Status).Equals("Settings updated");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task IFluentMockServerAdmin_PutSettingsAsync()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var server = FluentMockServer.StartWithAdminInterface();
|
||||||
|
var api = RestClient.For<IFluentMockServerAdmin>(server.Urls[0]);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var settings = new SettingsModel();
|
||||||
|
var status = await api.PutSettingsAsync(settings);
|
||||||
|
Check.That(status.Status).Equals("Settings updated");
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task IFluentMockServerAdmin_PostMappingAsync()
|
public async Task IFluentMockServerAdmin_PostMappingAsync()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user