This commit is contained in:
Stef Heyenrath
2026-02-14 12:35:15 +01:00
parent b172f700e0
commit c24f2396ff
111 changed files with 152 additions and 183 deletions

View File

@@ -2,7 +2,7 @@
using System.Net.Http;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using NFluent;

View File

@@ -4,7 +4,7 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using NFluent;
using RestEase;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics.CodeAnalysis;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Client;
using WireMock.Client.Extensions;
using WireMock.Net.Tests.VerifyExtensions;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Collections;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Extensions;
namespace WireMock.Net.Tests.Extensions;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Extensions;
namespace WireMock.Net.Tests.Extensions;

View File

@@ -1,6 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace WireMock.Net.Tests.Facts;
@@ -12,7 +13,9 @@ public sealed class IgnoreOnContinuousIntegrationFact : FactAttribute
private static readonly bool IsContinuousIntegrationGithub = bool.TryParse(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"), out var isGH) && isGH;
private static readonly bool IsContinuousIntegration = IsContinuousIntegrationAzure || IsContinuousIntegrationGithub;
public IgnoreOnContinuousIntegrationFact()
public IgnoreOnContinuousIntegrationFact(
[CallerFilePath] string? sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1) : base(sourceFilePath, sourceLineNumber)
{
if (IsContinuousIntegration)
{

View File

@@ -10,7 +10,8 @@ namespace WireMock.Net.Tests.Facts;
[ExcludeFromCodeCoverage]
public sealed class RunOnDockerPlatformFact : FactAttribute
{
public RunOnDockerPlatformFact(string platform,
public RunOnDockerPlatformFact(
string platform,
[CallerFilePath] string? sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1) : base(sourceFilePath, sourceLineNumber)
{

View File

@@ -1,37 +0,0 @@
// Copyright © WireMock.Net
using FluentAssertions;
using FluentAssertions.Execution;
using WireMock.FluentAssertions;
namespace WireMock.Net.Tests.FluentAssertions;
public static class WireMockAssertionsExtensions
{
[CustomAssertion]
public static AndWhichConstraint<WireMockAssertions, string> AtAbsoluteUrl2(this WireMockAssertions assertions,
string absoluteUrl, string because = "", params object[] becauseArgs)
{
var (filter, condition) = assertions.BuildFilterAndCondition(request => string.Equals(request.AbsoluteUrl, absoluteUrl, StringComparison.OrdinalIgnoreCase));
Execute.Assertion
.BecauseOf(because, becauseArgs)
.Given(() => assertions.RequestMessages)
.ForCondition(requests => assertions.CallsCount == 0 || requests.Any())
.FailWith(
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but no calls were made.",
absoluteUrl
)
.Then
.ForCondition(condition)
.FailWith(
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but didn't find it among the calls to {1}.",
_ => absoluteUrl,
requests => requests.Select(request => request.AbsoluteUrl)
);
assertions.FilterRequestMessages(filter);
return new AndWhichConstraint<WireMockAssertions, string>(assertions, absoluteUrl);
}
}

View File

@@ -4,8 +4,8 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using FluentAssertions;
using WireMock.FluentAssertions;
using AwesomeAssertions;
using WireMock.AwesomeAssertions;
using WireMock.Matchers;
using WireMock.RequestBuilders;
using WireMock.ResponseBuilders;
@@ -33,7 +33,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedNoCalls_AtAbsoluteUrl_WhenACallWasNotMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("xxx");
await _httpClient.GetAsync("xxx", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedNoCalls()
@@ -43,7 +43,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived0Calls_AtAbsoluteUrl_WhenACallWasNotMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("xxx");
await _httpClient.GetAsync("xxx", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(0).Calls()
@@ -53,7 +53,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived1Calls_AtAbsoluteUrl_WhenACallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(1).Calls()
@@ -63,17 +63,17 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived1Calls_AtAbsoluteUrl2_WhenACallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(1).Calls()
.AtAbsoluteUrl2($"http://localhost:{_portUsed}/anyurl");
.AtAbsoluteUrl($"http://localhost:{_portUsed}/anyurl");
}
[Fact]
public async Task HaveReceived1Calls_AtAbsoluteUrlUsingPost_WhenAPostCallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.PostAsync("anyurl", new StringContent(""));
await _httpClient.PostAsync("anyurl", new StringContent(""), TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(1).Calls()
@@ -85,9 +85,9 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived2Calls_AtAbsoluteUrl_WhenACallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(2).Calls()
@@ -97,7 +97,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsoluteUrl_WhenACallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -107,7 +107,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsoluteUrlWildcardMatcher_WhenACallWasMadeToAbsoluteUrl_Should_BeOK()
{
await _httpClient.GetAsync("anyurl");
await _httpClient.GetAsync("anyurl", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -129,7 +129,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsoluteUrl_Should_ThrowWhenNoCallsMatchingTheAbsoluteUrlWereMade()
{
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
Action act = () => _server.Should()
.HaveReceivedACall()
@@ -143,7 +143,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedNoCalls_AtAbsolutePath_WhenACallWasNotMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("xxx");
await _httpClient.GetAsync("xxx", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedNoCalls()
@@ -153,7 +153,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived0Calls_AtAbsolutePath_WhenACallWasNotMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("xxx");
await _httpClient.GetAsync("xxx", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(0).Calls()
@@ -163,7 +163,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived1Calls_AtAbsolutePath_WhenACallWasMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("anypath");
await _httpClient.GetAsync("anypath", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(1).Calls()
@@ -173,7 +173,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived1Calls_AtAbsolutePathUsingPost_WhenAPostCallWasMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.PostAsync("anypath", new StringContent(""));
await _httpClient.PostAsync("anypath", new StringContent(""), TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(1).Calls()
@@ -185,9 +185,9 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceived2Calls_AtAbsolutePath_WhenACallWasMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("anypath");
await _httpClient.GetAsync("anypath", TestContext.Current.CancellationToken);
await _httpClient.GetAsync("anypath");
await _httpClient.GetAsync("anypath", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceived(2).Calls()
@@ -197,7 +197,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsolutePath_WhenACallWasMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("anypath");
await _httpClient.GetAsync("anypath", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -207,7 +207,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsolutePathWildcardMatcher_WhenACallWasMadeToAbsolutePath_Should_BeOK()
{
await _httpClient.GetAsync("anypath");
await _httpClient.GetAsync("anypath", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -229,7 +229,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_AtAbsolutePath_Should_ThrowWhenNoCallsMatchingTheAbsolutePathWereMade()
{
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
Action act = () => _server.Should()
.HaveReceivedACall()
@@ -244,7 +244,7 @@ public class WireMockAssertionsTests : IDisposable
public async Task HaveReceivedACall_WithHeader_WhenACallWasMadeWithExpectedHeader_Should_BeOK()
{
_httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer a");
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -255,7 +255,7 @@ public class WireMockAssertionsTests : IDisposable
public async Task HaveReceivedACall_WithHeader_WhenACallWasMadeWithExpectedHeaderWithValue_Should_BeOK()
{
_httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer a");
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -267,10 +267,10 @@ public class WireMockAssertionsTests : IDisposable
{
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
await _httpClient.GetAsync("1");
await _httpClient.GetAsync("1", TestContext.Current.CancellationToken);
_httpClient.DefaultRequestHeaders.AcceptLanguage.Add(new StringWithQualityHeaderValue("EN"));
await _httpClient.GetAsync("2");
await _httpClient.GetAsync("2", TestContext.Current.CancellationToken);
_server.Should()
.HaveReceivedACall()
@@ -282,7 +282,7 @@ public class WireMockAssertionsTests : IDisposable
[Fact]
public async Task HaveReceivedACall_WithHeader_Should_ThrowWhenNoCallsMatchingTheHeaderNameWereMade()
{
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
Action act = () => _server.Should()
.HaveReceivedACall()
@@ -298,7 +298,7 @@ public class WireMockAssertionsTests : IDisposable
{
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
await _httpClient.GetAsync("");
await _httpClient.GetAsync("", TestContext.Current.CancellationToken);
Action act = () => _server.Should()
.HaveReceivedACall()
@@ -316,7 +316,7 @@ public class WireMockAssertionsTests : IDisposable
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
await httpClient.GetAsync("");
await httpClient.GetAsync("", TestContext.Current.CancellationToken);
Action act = () => _server.Should()
.HaveReceivedACall()
@@ -331,6 +331,7 @@ public class WireMockAssertionsTests : IDisposable
public async Task HaveReceivedACall_WithHeader_ShouldCheckAllRequests()
{
// Arrange
var cancellationToken = TestContext.Current.CancellationToken;
using var server = WireMockServer.Start();
using var client1 = server.CreateClient();
@@ -344,7 +345,7 @@ public class WireMockAssertionsTests : IDisposable
{
Authorization = new AuthenticationHeaderValue("Bearer", "invalidToken")
}
});
}, cancellationToken);
// Act 2
var task2 = client2.SendAsync(new HttpRequestMessage(HttpMethod.Get, "/")
@@ -353,7 +354,7 @@ public class WireMockAssertionsTests : IDisposable
{
Authorization = new AuthenticationHeaderValue("Bearer", "validToken")
}
});
}, cancellationToken);
await Task.WhenAll(task1, task2);

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Grpc;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Grpc;

View File

@@ -5,7 +5,7 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using ExampleIntegrationTest.Lookup;
using FluentAssertions;
using AwesomeAssertions;
using Google.Protobuf.WellKnownTypes;
using Greet;
using Grpc.Net.Client;

View File

@@ -2,7 +2,7 @@
using System.Net.Http.Headers;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Http;
namespace WireMock.Net.Tests.Http;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Http;
using WireMock.Models;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Net.Http.Headers;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Http;
namespace WireMock.Net.Tests.Http;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;

View File

@@ -2,7 +2,7 @@
using System.Net.Http;
using AnyOfTypes;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
namespace WireMock.Net.Tests.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using GraphQLParser.Exceptions;
using WireMock.Exceptions;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NFluent;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NFluent;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,4 +1,4 @@
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
namespace WireMock.Net.Tests.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.GraphQL.Models;
namespace WireMock.Net.Tests.Matchers.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using ProtoBuf;
using WireMock.Matchers;
using WireMock.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Matchers.Request;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using AnyOfTypes;
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;
using WireMock.Models;

View File

@@ -3,7 +3,7 @@
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using NFluent;
using WireMock.Logging;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Net.OpenApiParser.Utils;
namespace WireMock.Net.Tests.OpenApiParser;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.OpenTelemetry;
namespace WireMock.Net.Tests.OpenTelemetry;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
#if NET6_0_OR_GREATER
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.Extensions.DependencyInjection;
using WireMock.OpenTelemetry;
using Xunit;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Logging;
using WireMock.Matchers.Request;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics.CodeAnalysis;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Owin;
using WireMock.Types;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using Moq;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Handlers;
using WireMock.Owin.Mappers;
using WireMock.ResponseBuilders;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Collections.Concurrent;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Logging;
using WireMock.Matchers.Request;

View File

@@ -12,7 +12,7 @@ using WireMock.Matchers;
using WireMock.Admin.Mappings;
using WireMock.Admin.Requests;
using WireMock.Settings;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Handlers;
using WireMock.Matchers.Request;
using WireMock.ResponseBuilders;

View File

@@ -2,7 +2,7 @@
using System.Net;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using WireMock.Matchers;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NFluent;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using GraphQL.Types;
using WireMock.Matchers;
using WireMock.Matchers.Request;

View File

@@ -2,7 +2,7 @@
#if MIMEKIT
using System.Collections.Generic;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.RequestBuilders;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.RequestBuilders;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using NFluent;
using WireMock.Matchers;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Matchers;
using WireMock.Matchers.Request;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;
using WireMock.Matchers.Request;

View File

@@ -2,7 +2,7 @@
using System.Net;
using System.Net.Http;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.RequestBuilders;
using WireMock.ResponseBuilders;
using WireMock.Server;
@@ -65,7 +65,8 @@ namespace WireMock.Net.Tests.ResponseBuilders
);
// Act
var response = await new HttpClient().GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
using var httpClient = new HttpClient();
var response = await httpClient.GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
// Assert
response.Should().Contain("<hello>world</hello>");

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using JsonConverter.Newtonsoft.Json;
using Microsoft.AspNetCore.Http;
using Moq;

View File

@@ -2,7 +2,7 @@
using System.Net;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using NFluent;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using WireMock.Models;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using Newtonsoft.Json.Linq;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using HandlebarsDotNet;
using Microsoft.AspNetCore.Http;
using Moq;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using Newtonsoft.Json;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using HandlebarsDotNet;
using Microsoft.AspNetCore.Http;
using Moq;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using Newtonsoft.Json.Linq;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using NFluent;

View File

@@ -4,7 +4,7 @@
using System.Net;
using System.Net.Http.Headers;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Models;
using WireMock.ResponseBuilders;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Net;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using WireMock.Models;

View File

@@ -2,7 +2,7 @@
using System.Globalization;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Microsoft.AspNetCore.Http;
using Moq;
using Newtonsoft.Json;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Net.Tests.VerifyExtensions;
using WireMock.RequestBuilders;
using WireMock.ResponseBuilders;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Models;
using WireMock.RequestBuilders;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using JsonConverter.Newtonsoft.Json;
using WireMock.Admin.Mappings;
using WireMock.Serialization;

View File

@@ -1,8 +1,8 @@
// Copyright © WireMock.Net
using AnyOfTypes;
using FluentAssertions;
using FluentAssertions.Execution;
using AwesomeAssertions;
using AwesomeAssertions.Execution;
using Moq;
using Newtonsoft.Json;
using NFluent;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using HandlebarsDotNet;
using HandlebarsDotNet.Helpers.Enums;
using Microsoft.AspNetCore.Http;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Settings;
using WireMock.Types;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Settings;
namespace WireMock.Net.Tests.Settings;

View File

@@ -2,7 +2,7 @@
using System.Net;
using System.Net.Http;
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.RequestBuilders;
using WireMock.ResponseBuilders;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Net.Testcontainers.Utils;
namespace WireMock.Net.Tests.Testcontainers;

View File

@@ -2,9 +2,9 @@
#if NET6_0_OR_GREATER
using System.Runtime.InteropServices;
using AwesomeAssertions;
using AwesomeAssertions.Execution;
using DotNet.Testcontainers.Builders;
using FluentAssertions;
using FluentAssertions.Execution;
using Meziantou.Extensions.Logging.Xunit.v3;
using Microsoft.Extensions.Logging;
using WireMock.Net.Testcontainers;

View File

@@ -2,8 +2,8 @@
#if NET6_0_OR_GREATER
using System.Text;
using FluentAssertions;
using FluentAssertions.Execution;
using AwesomeAssertions;
using AwesomeAssertions.Execution;
using Greet;
using Grpc.Net.Client;
using Meziantou.Extensions.Logging.Xunit.v3;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Handlers;
using WireMock.Settings;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Handlers;
using WireMock.Transformers.Scriban;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Types;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Newtonsoft.Json.Linq;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using RandomDataGenerator.FieldOptions;
using RandomDataGenerator.Randomizers;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Globalization;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Handlers;
using WireMock.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using System.Net;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics.CodeAnalysis;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Types;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Text.RegularExpressions;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Util;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Util;
namespace WireMock.Net.Tests.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using AnyOfTypes;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Models;
using WireMock.Util;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Diagnostics.CodeAnalysis;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Validators;
namespace WireMock.Net.Tests.Validators;

View File

@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
using System.Net.WebSockets;
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Matchers;
using WireMock.Net.Xunit;
using WireMock.RequestBuilders;

View File

@@ -48,7 +48,7 @@
</ItemGroup>-->
<ItemGroup>
<ProjectReference Include="..\..\src\WireMock.Net.FluentAssertions\WireMock.Net.FluentAssertions.csproj" />
<ProjectReference Include="..\..\src\WireMock.Net.AwesomeAssertions\WireMock.Net.AwesomeAssertions.csproj" />
<ProjectReference Include="..\..\src\WireMock.Net.Matchers.CSharpCode\WireMock.Net.Matchers.CSharpCode.csproj" />
<ProjectReference Include="..\..\src\WireMock.Net.RestClient\WireMock.Net.RestClient.csproj" />
<ProjectReference Include="..\..\src\WireMock.Net.xUnit.v3\WireMock.Net.xUnit.v3.csproj" />

View File

@@ -3,7 +3,7 @@
using System.Net;
using System.Net.Http;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using Newtonsoft.Json;
using NFluent;

View File

@@ -4,7 +4,7 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using FluentAssertions;
using AwesomeAssertions;
using Moq;
using WireMock.Handlers;
using WireMock.Server;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using NFluent;
using WireMock.Matchers;
using WireMock.Owin;

View File

@@ -1,6 +1,6 @@
// Copyright © WireMock.Net
using FluentAssertions;
using AwesomeAssertions;
using WireMock.Server;
namespace WireMock.Net.Tests

Some files were not shown because too many files have changed in this diff Show More