mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-25 10:19:04 +02:00
Add AdminPath to WireMockServerSettings (#1130)
* Make admin endpoint configurable * Add AdminPath to WireMockServerSettings * sealed * foo * WireMockServer_CreateClient_And_CallAdminSettingsEndpoint
This commit is contained in:
@@ -95,6 +95,28 @@ public partial class WireMockAdminApiTests
|
||||
Check.That(settings).IsNotNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_GetSettingsAsync_ForDifferentAdminPath()
|
||||
{
|
||||
// Arrange
|
||||
var server = WireMockServer.Start(w =>
|
||||
{
|
||||
w.StartAdminInterface = true;
|
||||
w.AdminPath = "/foo/__admin";
|
||||
});
|
||||
var api = RestClient.For<IWireMockAdminApi>(server.Urls[0] + "/foo");
|
||||
|
||||
// Act
|
||||
var settings = await api.GetSettingsAsync().ConfigureAwait(false);
|
||||
|
||||
// Assert
|
||||
Check.That(settings).IsNotNull();
|
||||
|
||||
// Cleanup
|
||||
server.Stop();
|
||||
server.Dispose();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_PostSettingsAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user