Rename classes

This commit is contained in:
Stef Heyenrath
2017-01-18 07:42:05 +01:00
parent c0872995b0
commit 8f02e99a00
23 changed files with 142 additions and 147 deletions

View File

@@ -22,10 +22,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_url()
{
// given
var spec = RequestBuilder.WithUrl("/foo");
var spec = Request.WithUrl("/foo");
// when
var request = new Request("/foo", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -35,10 +35,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_url_prefix()
{
// given
var spec = RequestBuilder.WithUrl("/foo*");
var spec = Request.WithUrl("/foo*");
// when
var request = new Request("/foo/bar", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo/bar", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -48,10 +48,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_not_matching_given_url()
{
// given
var spec = RequestBuilder.WithUrl("/foo");
var spec = Request.WithUrl("/foo");
// when
var request = new Request("/bar", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/bar", string.Empty, "blabla", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -61,10 +61,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_path()
{
// given
var spec = RequestBuilder.WithPath("/foo");
var spec = Request.WithPath("/foo");
// when
var request = new Request("/foo", "?param=1", "blabla", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo", "?param=1", "blabla", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -74,10 +74,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_url_and_method()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingPut();
var spec = Request.WithUrl("/foo").UsingPut();
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -87,10 +87,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_matching_given_url_but_not_http_method()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingPut();
var spec = Request.WithUrl("/foo").UsingPut();
// when
var request = new Request("/foo", string.Empty, "POST", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo", string.Empty, "POST", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -100,10 +100,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_matching_given_http_method_but_not_url()
{
// given
var spec = RequestBuilder.WithUrl("/bar").UsingPut();
var spec = Request.WithUrl("/bar").UsingPut();
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string>());
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -113,10 +113,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_url_and_headers()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tata");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tata");
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "tata" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "tata" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -126,10 +126,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_not_matching_given_headers()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tatata");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tatata");
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "tata" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "tata" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -139,10 +139,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_not_matching_given_headers_ignorecase()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "abc", false);
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "abc", false);
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "ABC" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "ABC" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -152,10 +152,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_header_prefix()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tata*");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithHeader("X-toto", "tata*");
// when
var request = new Request("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "TaTaTa" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "whatever", new Dictionary<string, string> { { "X-toto", "TaTaTa" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -165,10 +165,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_body()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithBody(".*Hello world!.*");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithBody(".*Hello world!.*");
// when
var request = new Request("/foo", string.Empty, "PUT", "Hello world!", new Dictionary<string, string> { { "X-toto", "tatata" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "Hello world!", new Dictionary<string, string> { { "X-toto", "tatata" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -178,10 +178,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_body_as_wildcard()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithBody("H.*o");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithBody("H.*o");
// when
var request = new Request("/foo", string.Empty, "PUT", "Hello world!", new Dictionary<string, string> { { "X-toto", "tatata" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "Hello world!", new Dictionary<string, string> { { "X-toto", "tatata" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -191,10 +191,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_not_matching_given_body()
{
// given
var spec = RequestBuilder.WithUrl("/foo").UsingAnyVerb().WithBody(" Hello world! ");
var spec = Request.WithUrl("/foo").UsingAnyVerb().WithBody(" Hello world! ");
// when
var request = new Request("/foo", string.Empty, "PUT", "XXXXXXXXXXX", new Dictionary<string, string> { { "X-toto", "tatata" } });
var request = new RequestMessage("/foo", string.Empty, "PUT", "XXXXXXXXXXX", new Dictionary<string, string> { { "X-toto", "tatata" } });
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();
@@ -204,10 +204,10 @@ namespace WireMock.Net.Tests
public void Should_specify_requests_matching_given_params()
{
// given
var spec = RequestBuilder.WithPath("/foo").WithParam("bar", "1", "2");
var spec = Request.WithPath("/foo").WithParam("bar", "1", "2");
// when
var request = new Request("/foo", "bar=1&bar=2", "Get", "Hello world!", new Dictionary<string, string>());
var request = new RequestMessage("/foo", "bar=1&bar=2", "Get", "Hello world!", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsTrue();
@@ -217,10 +217,10 @@ namespace WireMock.Net.Tests
public void Should_exclude_requests_not_matching_given_params()
{
// given
var spec = RequestBuilder.WithPath("/foo").WithParam("bar", "1");
var spec = Request.WithPath("/foo").WithParam("bar", "1");
// when
var request = new Request("/foo", string.Empty, "PUT", "XXXXXXXXXXX", new Dictionary<string, string>());
var request = new RequestMessage("/foo", string.Empty, "PUT", "XXXXXXXXXXX", new Dictionary<string, string>());
// then
Check.That(spec.IsSatisfiedBy(request)).IsFalse();