Implemented #82

This commit is contained in:
Stef Heyenrath
2018-02-02 11:17:37 +01:00
parent 40ff8514ac
commit 66b2ff16de
15 changed files with 464 additions and 349 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using NFluent;
using WireMock.Matchers.Request;
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().UsingAnyVerb().WithCookie("session", "a*");
// when
var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, null, null, null, null, new Dictionary<string, string> { { "session", "abc" } });
// then
var requestMatchResult = new RequestMatchResult();
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
}
}
}