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