mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-14 06:13:35 +01:00
* netcore 2.1 * SimpleCommandLineParserTests * tests * SimpleCommandLineParserTests * test report * AspNetCoreSelfHost * Fixed Resharper warnings * tests * . * ResponseWithProxyTests ResponseWithProxyTests * postmanecho
27 lines
803 B
C#
27 lines
803 B
C#
using System.Collections.Generic;
|
|
using NFluent;
|
|
using WireMock.Matchers;
|
|
using WireMock.Matchers.Request;
|
|
using WireMock.RequestBuilders;
|
|
using Xunit;
|
|
|
|
namespace WireMock.Net.Tests.RequestBuilders
|
|
{
|
|
public class RequestBuilderWithBodyTests
|
|
{
|
|
[Fact]
|
|
public void RequestBuilder_WithBody_IMatcher()
|
|
{
|
|
// Assign
|
|
var matcher = new WildcardMatcher("x");
|
|
|
|
// Act
|
|
var requestBuilder = (Request)Request.Create().WithBody(matcher);
|
|
|
|
// Assert
|
|
var matchers = requestBuilder.GetPrivateFieldValue<IList<IRequestMatcher>>("_requestMatchers");
|
|
Check.That(matchers.Count()).IsEqualTo(1);
|
|
Check.That(((RequestMessageBodyMatcher) matchers[0]).Matcher).IsEqualTo(matcher);
|
|
}
|
|
}
|
|
} |