mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-14 22:33:35 +01:00
* 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>
40 lines
1017 B
C#
40 lines
1017 B
C#
// 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 |