Rewrite some unit-integration-tests to unit-tests (#206 #207)

Rewrite some unit-integration-tests to unit-tests (#206)
This commit is contained in:
Stef Heyenrath
2018-09-26 17:43:26 +02:00
committed by GitHub
parent 713e59bbf9
commit ada50d893f
134 changed files with 9159 additions and 8434 deletions

View File

@@ -0,0 +1,27 @@
using System.Collections.Generic;
using NFluent;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.RequestBuilders;
using Xunit;
namespace WireMock.Net.Tests
{
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);
}
}
}