Files
WireMock.Net-wiremock/test/WireMock.Net.Tests/RequestCookieTests.cs
Stef Heyenrath 83457c1601 NET Core 2.1 + support for Service Fabric commandline parameters (#209)
* netcore 2.1

* SimpleCommandLineParserTests

* tests

* SimpleCommandLineParserTests

* test report

* AspNetCoreSelfHost

* Fixed Resharper warnings

* tests

* .

* ResponseWithProxyTests

ResponseWithProxyTests

* postmanecho
2018-10-10 09:49:32 +02:00

28 lines
836 B
C#

using System.Collections.Generic;
using NFluent;
using WireMock.Matchers.Request;
using WireMock.Models;
using WireMock.RequestBuilders;
using Xunit;
namespace WireMock.Net.Tests
{
public class RequestCookieTests
{
private const string ClientIp = "::1";
[Fact]
public void Request_WithCookie_OK()
{
// given
var spec = Request.Create().UsingAnyMethod().WithCookie("session", "a*");
// when
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, null, null, new Dictionary<string, string> { { "session", "abc" } });
// then
var requestMatchResult = new RequestMatchResult();
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
}
}
}