mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Update RequestModelBuilder (add WithHeader) (#1306)
* Update RequestModelBuilder (add WithHeader) * rejectOnMatch * fix
This commit is contained in:
@@ -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