mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 17:28:55 +02:00
1.7.x (#1268)
* Fix construction of path in OpenApiParser (#1265) * Server-Sent Events (#1269) * Server Side Events * fixes * await HandleSseStringAsync(responseMessage, response, bodyData); * 1.7.5-preview-01 * IBlockingQueue * 1.7.5-preview-02 (03 April 2025) * IBlockingQueue * ... * Support OpenApi V31 (#1279) * Support OpenApi V31 * Update src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fx --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add ProtoDefinitionHelper.FromDirectory (#1263) * Add ProtoDefinitionHelper.FromDirectory * . * unix-windows * move test * imports in the proto files indeed should use a forward slash * updates * . * private Func<IdOrTexts> ProtoDefinitionFunc() * OpenTelemetry * . * fix path utils --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
40
test/WireMock.Net.Tests/OpenApiParser/PathUtilsTests.cs
Normal file
40
test/WireMock.Net.Tests/OpenApiParser/PathUtilsTests.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if !(NET452 || NET461 || NETCOREAPP3_1)
|
||||
using FluentAssertions;
|
||||
using WireMock.Net.OpenApiParser.Utils;
|
||||
using Xunit;
|
||||
|
||||
namespace WireMock.Net.Tests.OpenApiParser;
|
||||
|
||||
public class PathUtilsTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(new string[] { }, "")]
|
||||
[InlineData(new[] { "path1" }, "path1")]
|
||||
[InlineData(new[] { "/path1" }, "/path1")]
|
||||
[InlineData(new[] { "/path1/" }, "/path1")]
|
||||
public void Combine_ShouldReturnCombinedPathTest1(string[] paths, string expected)
|
||||
{
|
||||
// Act
|
||||
var result = PathUtils.Combine(paths);
|
||||
|
||||
// Assert
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/path1", "path2")]
|
||||
[InlineData("/path1/", "path2")]
|
||||
[InlineData("/path1", "/path2")]
|
||||
[InlineData("/path1", "path2/")]
|
||||
public void Combine_ShouldReturnCombinedPathTest2(params string[] paths)
|
||||
{
|
||||
// Act
|
||||
var result = PathUtils.Combine(paths);
|
||||
|
||||
// Assert
|
||||
result.Should().Be("/path1/path2");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user