mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 17:28:55 +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:
@@ -0,0 +1,35 @@
|
||||
using FluentAssertions;
|
||||
using WireMock.Settings;
|
||||
using Xunit;
|
||||
|
||||
namespace WireMock.Net.Tests.Settings;
|
||||
|
||||
public class WireMockServerSettingsParserTests
|
||||
{
|
||||
[Fact]
|
||||
public void TryParseArguments_With_Args()
|
||||
{
|
||||
// Act
|
||||
var result = WireMockServerSettingsParser.TryParseArguments(new[]
|
||||
{
|
||||
"--adminPath", "ap"
|
||||
}, null, out var settings);
|
||||
|
||||
// Assert
|
||||
result.Should().BeTrue();
|
||||
settings.Should().NotBeNull();
|
||||
settings!.AdminPath.Should().Be("ap");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TryParseArguments_Without_Args()
|
||||
{
|
||||
// Act
|
||||
var result = WireMockServerSettingsParser.TryParseArguments(new string[] { }, null, out var settings);
|
||||
|
||||
// Assert
|
||||
result.Should().BeTrue();
|
||||
settings.Should().NotBeNull();
|
||||
settings!.AdminPath.Should().Be("/__admin");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user