mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-06 10:29:33 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05b5876b5c | ||
|
|
c1bd2d315f | ||
|
|
8917a6eaaa | ||
|
|
3cc9040f51 |
@@ -1,3 +1,10 @@
|
||||
# 1.8.10 (10 June 2025)
|
||||
- [#1306](https://github.com/wiremock/WireMock.Net/pull/1306) - Update RequestModelBuilder (add WithHeader) [feature] contributed by [StefH](https://github.com/StefH)
|
||||
- [#1308](https://github.com/wiremock/WireMock.Net/pull/1308) - For some projects, change dependency to WireMock.Net.Minimal [feature] contributed by [StefH](https://github.com/StefH)
|
||||
- [#1309](https://github.com/wiremock/WireMock.Net/pull/1309) - Update AwesomeAssertions to version 9 [feature] contributed by [StefH](https://github.com/StefH)
|
||||
- [#1305](https://github.com/wiremock/WireMock.Net/issues/1305) - AdminApiMappingBuilder do not expose WithHeader for Request [feature]
|
||||
- [#1307](https://github.com/wiremock/WireMock.Net/issues/1307) - Update WireMock.Net.AwesomeAssertions to use latest version from AwesomeAssertions [feature]
|
||||
|
||||
# 1.8.9 (28 May 2025)
|
||||
- [#1303](https://github.com/wiremock/WireMock.Net/pull/1303) - Add option to provide X509Certificate [feature] contributed by [StefH](https://github.com/StefH)
|
||||
- [#1302](https://github.com/wiremock/WireMock.Net/issues/1302) - Support In-Memory SSL Certificate [feature]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.8.9</VersionPrefix>
|
||||
<VersionPrefix>1.8.10</VersionPrefix>
|
||||
<PackageIcon>WireMock.Net-Logo.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/wiremock/WireMock.Net</PackageProjectUrl>
|
||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
rem https://github.com/StefH/GitHubReleaseNotes
|
||||
|
||||
SET version=1.8.9
|
||||
SET version=1.8.10
|
||||
|
||||
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels wontfix test question invalid doc duplicate example environment --version %version% --token %GH_TOKEN%
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# 1.8.8 (28 May 2025)
|
||||
- #1303 Add option to provide X509Certificate [feature]
|
||||
- #1302 Support In-Memory SSL Certificate [feature]
|
||||
# 1.8.10 (10 June 2025)
|
||||
- #1306 Update RequestModelBuilder (add WithHeader) [feature]
|
||||
- #1308 For some projects, change dependency to WireMock.Net.Minimal [feature]
|
||||
- #1309 Update AwesomeAssertions to version 9 [feature]
|
||||
- #1305 AdminApiMappingBuilder do not expose WithHeader for Request [feature]
|
||||
- #1307 Update WireMock.Net.AwesomeAssertions to use latest version from AwesomeAssertions [feature]
|
||||
|
||||
The full release notes can be found here: https://github.com/wiremock/WireMock.Net/blob/master/CHANGELOG.md
|
||||
@@ -138,4 +138,27 @@ public partial class RequestModelBuilder
|
||||
return builder.Build();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WithHeader: matching based on name, pattern and matchBehaviour.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="pattern">The pattern.</param>
|
||||
/// <param name="rejectOnMatch">The match behaviour. Default value is <c>false</c>.</param>
|
||||
/// <returns>The <see cref="RequestModelBuilder"/>.</returns>
|
||||
public RequestModelBuilder WithHeader(string name, string pattern, bool rejectOnMatch = false)
|
||||
{
|
||||
return WithHeaders(headersBuilder => headersBuilder
|
||||
.Add(headerBuilder => headerBuilder
|
||||
.WithName(name)
|
||||
.WithMatchers(matchersBuilder => matchersBuilder
|
||||
.Add(matcherBuilder => matcherBuilder
|
||||
.WithName("WildcardMatcher")
|
||||
.WithPattern(pattern)
|
||||
.WithRejectOnMatch(rejectOnMatch)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||
<ProjectReference Include="..\WireMock.Net.Minimal\WireMock.Net.Minimal.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using FluentAssertions.Primitives;
|
||||
using AwesomeAssertions.Primitives;
|
||||
using WireMock.Server;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
global using System.Linq;
|
||||
global using FluentAssertions;
|
||||
global using FluentAssertions.Execution;
|
||||
global using AwesomeAssertions;
|
||||
global using AwesomeAssertions.Execution;
|
||||
@@ -32,11 +32,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AwesomeAssertions" Version="8.1.0" />
|
||||
<PackageReference Include="AwesomeAssertions" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||
<ProjectReference Include="..\WireMock.Net.Minimal\WireMock.Net.Minimal.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -40,7 +40,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||
<ProjectReference Include="..\WireMock.Net.Minimal\WireMock.Net.Minimal.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -34,7 +34,7 @@
|
||||
<Target Name="CheckIfShouldKillVBCSCompiler" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||
<ProjectReference Include="..\WireMock.Net.Minimal\WireMock.Net.Minimal.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'net452' ">
|
||||
|
||||
@@ -15,6 +15,19 @@
|
||||
Methods: [
|
||||
POST
|
||||
],
|
||||
Headers: [
|
||||
{
|
||||
Name: Authorization,
|
||||
Matchers: [
|
||||
{
|
||||
Name: WildcardMatcher,
|
||||
Pattern: *,
|
||||
IgnoreCase: false,
|
||||
RejectOnMatch: true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Body: {
|
||||
Matcher: {
|
||||
Name: JsonPartialMatcher,
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using VerifyTests;
|
||||
using VerifyXunit;
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Client;
|
||||
using WireMock.Client.Extensions;
|
||||
using WireMock.Net.Tests.VerifyExtensions;
|
||||
@@ -41,6 +42,7 @@ public class AdminApiMappingBuilderTests
|
||||
.WithRequest(req => req
|
||||
.UsingPost()
|
||||
.WithPath("/bla1")
|
||||
.WithHeader("Authorization", "*", true)
|
||||
.WithBody(body => body
|
||||
.WithMatcher(matcher => matcher
|
||||
.WithName("JsonPartialMatcher")
|
||||
|
||||
Reference in New Issue
Block a user