mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-24 01:08:28 +02:00
remove nfluent
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -79,7 +77,7 @@ public class CSharpCodeMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("CSharpCodeMatcher");
|
||||
name.Should().Be("CSharpCodeMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -92,6 +90,6 @@ public class CSharpCodeMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("x");
|
||||
patterns.Should().ContainSingle("x");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -51,7 +49,7 @@ public class ContentTypeMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("ContentTypeMatcher");
|
||||
name.Should().Be("ContentTypeMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -64,6 +62,6 @@ public class ContentTypeMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("x");
|
||||
patterns.Should().ContainSingle("x");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -17,7 +16,7 @@ public class ExactMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("ExactMatcher");
|
||||
name.Should().Be("ExactMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -30,7 +29,7 @@ public class ExactMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -43,7 +42,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("X").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -56,7 +55,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -69,7 +68,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("y").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -82,7 +81,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -95,7 +94,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -111,7 +110,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(score);
|
||||
result.Should().Be(score);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -124,7 +123,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("caR").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -137,7 +136,7 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("cat").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -150,6 +149,6 @@ public class ExactMatcherTests
|
||||
double result = matcher.IsMatch("cat").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -18,7 +18,7 @@ public class ExactObjectMatcherTests
|
||||
var name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("ExactObjectMatcher");
|
||||
name.Should().Be("ExactObjectMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -32,7 +32,7 @@ public class ExactObjectMatcherTests
|
||||
var score = matcher.IsMatch(checkValue).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(1.0);
|
||||
score.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -46,7 +46,7 @@ public class ExactObjectMatcherTests
|
||||
var score = matcher.IsMatch(new { x = 500, s = "s" }).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(1.0);
|
||||
score.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -60,6 +60,6 @@ public class ExactObjectMatcherTests
|
||||
var score = matcher.IsMatch(new { x = 500, s = "s" }).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(0.0);
|
||||
score.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
using System.Net.Http;
|
||||
using AnyOfTypes;
|
||||
using AwesomeAssertions;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Models;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using GraphQLParser.Exceptions;
|
||||
using WireMock.Exceptions;
|
||||
using WireMock.Matchers;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -19,7 +18,7 @@ public class JmesPathMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("JmesPathMatcher");
|
||||
name.Should().Be("JmesPathMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -32,7 +31,7 @@ public class JmesPathMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -46,7 +45,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(bytes).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -59,7 +58,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(null).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -72,7 +71,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(string.Empty).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -86,7 +85,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(o).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -99,7 +98,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch("").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -112,7 +111,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -125,7 +124,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(new { things = new { name = "RequiredThing" } }).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -148,7 +147,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(jobject).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -161,7 +160,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(JObject.Parse("{ \"things\": { \"x\": \"RequiredThing\" } }")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -174,7 +173,7 @@ public class JmesPathMatcherTests
|
||||
double match = matcher.IsMatch(JObject.Parse("{ \"things\": { \"x\": \"RequiredThing\" } }")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0.0);
|
||||
match.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -202,4 +201,4 @@ public class JmesPathMatcherTests
|
||||
// Assert
|
||||
score.Should().Be(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -42,7 +41,7 @@ public class JsonMatcherTests
|
||||
var name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("JsonMatcher");
|
||||
name.Should().Be("JsonMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -55,7 +54,7 @@ public class JsonMatcherTests
|
||||
var value = matcher.Value;
|
||||
|
||||
// Assert
|
||||
Check.That(value).Equals("{}");
|
||||
value.Should().Be("{}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -105,7 +104,7 @@ public class JsonMatcherTests
|
||||
var match = matcher.IsMatch(bytes).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -119,7 +118,7 @@ public class JsonMatcherTests
|
||||
var match = matcher.IsMatch(s).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -133,7 +132,7 @@ public class JsonMatcherTests
|
||||
var match = matcher.IsMatch(o).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -524,4 +523,4 @@ public class JsonMatcherTests
|
||||
// Assert
|
||||
Assert.Equal(1.0, score);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -20,7 +19,7 @@ public class JsonPartialMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("JsonPartialMatcher");
|
||||
name.Should().Be("JsonPartialMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -33,7 +32,7 @@ public class JsonPartialMatcherTests
|
||||
object value = matcher.Value;
|
||||
|
||||
// Assert
|
||||
Check.That(value).Equals("{}");
|
||||
value.Should().Be("{}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -83,7 +82,7 @@ public class JsonPartialMatcherTests
|
||||
double match = matcher.IsMatch(bytes).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -97,7 +96,7 @@ public class JsonPartialMatcherTests
|
||||
double match = matcher.IsMatch(s).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -111,7 +110,7 @@ public class JsonPartialMatcherTests
|
||||
double match = matcher.IsMatch(o).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -463,4 +462,4 @@ public class JsonPartialMatcherTests
|
||||
// Assert
|
||||
Assert.Equal(0.0, match);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -20,7 +19,7 @@ public class JsonPartialWildcardMatcherTests
|
||||
var name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("JsonPartialWildcardMatcher");
|
||||
name.Should().Be("JsonPartialWildcardMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -33,7 +32,7 @@ public class JsonPartialWildcardMatcherTests
|
||||
var value = matcher.Value;
|
||||
|
||||
// Assert
|
||||
Check.That(value).Equals("{}");
|
||||
value.Should().Be("{}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -83,7 +82,7 @@ public class JsonPartialWildcardMatcherTests
|
||||
var match = matcher.IsMatch(bytes).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -97,7 +96,7 @@ public class JsonPartialWildcardMatcherTests
|
||||
var match = matcher.IsMatch(s).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -111,7 +110,7 @@ public class JsonPartialWildcardMatcherTests
|
||||
var match = matcher.IsMatch(o).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -417,4 +416,4 @@ public class JsonPartialWildcardMatcherTests
|
||||
// Assert
|
||||
Assert.Equal(1.0, match);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -19,7 +17,7 @@ public class JsonPathMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("JsonPathMatcher");
|
||||
name.Should().Be("JsonPathMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -32,7 +30,7 @@ public class JsonPathMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -46,7 +44,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(bytes).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -59,7 +57,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(null).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -72,7 +70,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(string.Empty).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -86,7 +84,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(o).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -99,7 +97,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch("").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -112,7 +110,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch("x").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -125,7 +123,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(new { Id = 1, Name = "Test" }).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -138,7 +136,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(new { things = new { name = "x" } }).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -152,7 +150,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(json).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -166,7 +164,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(json).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
match.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -185,7 +183,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(jobject).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -198,7 +196,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(JObject.Parse("{\"Id\":1,\"Name\":\"Test\"}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1);
|
||||
match.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -211,7 +209,7 @@ public class JsonPathMatcherTests
|
||||
double match = matcher.IsMatch(JObject.Parse("{\"Id\":1,\"Name\":\"Test\"}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0.0);
|
||||
match.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -231,7 +229,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1.0);
|
||||
match.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -253,7 +251,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1.0);
|
||||
match.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -275,7 +273,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0.0);
|
||||
match.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -293,7 +291,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0.0);
|
||||
match.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -311,7 +309,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0.0);
|
||||
match.Should().Be(0.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -335,7 +333,7 @@ public class JsonPathMatcherTests
|
||||
}")).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(1.0);
|
||||
match.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -385,4 +383,4 @@ public class JsonPathMatcherTests
|
||||
// Assert
|
||||
match.Should().Be(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
using FluentAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
using Xunit;
|
||||
|
||||
@@ -99,7 +99,7 @@ public class LinqMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("LinqMatcher");
|
||||
name.Should().Be("LinqMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -112,6 +112,6 @@ public class LinqMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("x");
|
||||
patterns.Should().ContainExactly("x");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -10,16 +9,16 @@ public class MatchBehaviourHelperTests
|
||||
[Fact]
|
||||
public void MatchBehaviourHelper_Convert_AcceptOnMatch()
|
||||
{
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 0.0)).IsEqualTo(0.0);
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 0.5)).IsEqualTo(0.5);
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 1.0)).IsEqualTo(1.0);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 0.0).Should().Be(0.0);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 0.5).Should().Be(0.5);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.AcceptOnMatch, 1.0).Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MatchBehaviourHelper_Convert_RejectOnMatch()
|
||||
{
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 0.0)).IsEqualTo(1.0);
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 0.5)).IsEqualTo(0.0);
|
||||
Check.That(MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 1.0)).IsEqualTo(0.0);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 0.0).Should().Be(1.0);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 0.5).Should().Be(0.0);
|
||||
MatchBehaviourHelper.Convert(MatchBehaviour.RejectOnMatch, 1.0).Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
using AwesomeAssertions;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Util;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using WireMock.GraphQL.Models;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers.Models;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -16,7 +14,7 @@ public class NotNullOrEmptyMatcherTests
|
||||
var name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("NotNullOrEmptyMatcher");
|
||||
name.Should().Be("NotNullOrEmptyMatcher");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -81,4 +79,4 @@ public class NotNullOrEmptyMatcherTests
|
||||
// Assert
|
||||
patterns.Should().BeEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using ProtoBuf;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Models;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -18,7 +16,7 @@ public class RegexMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("RegexMatcher");
|
||||
name.Should().Be("RegexMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -31,7 +29,7 @@ public class RegexMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -42,8 +40,8 @@ public class RegexMatcherTests
|
||||
bool case2 = new RegexMatcher("X", true).IgnoreCase;
|
||||
|
||||
// Assert
|
||||
Check.That(case1).IsFalse();
|
||||
Check.That(case2).IsTrue();
|
||||
case1.Should().BeFalse();
|
||||
case2.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -56,7 +54,7 @@ public class RegexMatcherTests
|
||||
double result = matcher.IsMatch("Hello world!").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0d);
|
||||
result.Should().Be(1.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -69,7 +67,7 @@ public class RegexMatcherTests
|
||||
double result = matcher.IsMatch(null).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0d);
|
||||
result.Should().Be(0.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -108,7 +106,7 @@ public class RegexMatcherTests
|
||||
double result = matcher.IsMatch("hello").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0d);
|
||||
result.Should().Be(1.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -121,6 +119,6 @@ public class RegexMatcherTests
|
||||
double result = matcher.IsMatch("hello").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AwesomeAssertions;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Matchers.Request;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using NFluent;
|
||||
|
||||
using WireMock.Matchers;
|
||||
|
||||
namespace WireMock.Net.Tests.Matchers;
|
||||
@@ -17,7 +17,7 @@ public class SimMetricsMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("SimMetricsMatcher.Levenstein");
|
||||
name.Should().Be("SimMetricsMatcher.Levenstein");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -30,7 +30,7 @@ public class SimMetricsMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -43,7 +43,7 @@ public class SimMetricsMatcherTests
|
||||
double result = matcher.IsMatch("The car drives in the street.").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsStrictlyLessThan(1.0).And.IsStrictlyGreaterThan(0.5);
|
||||
result.Should().BeLessThan(1.0).And.BeGreaterThan(0.5);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -56,7 +56,7 @@ public class SimMetricsMatcherTests
|
||||
double result = matcher.IsMatch("Hello").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsStrictlyLessThan(0.1).And.IsStrictlyGreaterThan(0.05);
|
||||
result.Should().BeLessThan(0.1).And.BeGreaterThan(0.05);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -69,7 +69,7 @@ public class SimMetricsMatcherTests
|
||||
double result = matcher.IsMatch("test").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -82,6 +82,6 @@ public class SimMetricsMatcherTests
|
||||
double result = matcher.IsMatch("test").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using AnyOfTypes;
|
||||
using AwesomeAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Models;
|
||||
|
||||
@@ -123,7 +121,7 @@ public class WildcardMatcherTest
|
||||
var name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("WildcardMatcher");
|
||||
name.Should().Be("WildcardMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -136,7 +134,7 @@ public class WildcardMatcherTest
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly(new AnyOf<string, StringPattern>("x"));
|
||||
patterns.Should().Equal(new[] { new AnyOf<string, StringPattern>("x") });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -148,6 +146,6 @@ public class WildcardMatcherTest
|
||||
// Act
|
||||
var result = matcher.IsMatch("m").Score;
|
||||
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using NFluent;
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Matchers;
|
||||
|
||||
@@ -18,7 +17,7 @@ public class XPathMatcherTests
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("XPathMatcher");
|
||||
name.Should().Be("XPathMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -31,7 +30,7 @@ public class XPathMatcherTests
|
||||
var patterns = matcher.GetPatterns();
|
||||
|
||||
// Assert
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
patterns.Should().ContainSingle("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -48,7 +47,7 @@ public class XPathMatcherTests
|
||||
double result = matcher.IsMatch(xml).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -80,7 +79,7 @@ public class XPathMatcherTests
|
||||
double result = matcher.IsMatch(input).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -113,7 +112,7 @@ public class XPathMatcherTests
|
||||
double result = matcher.IsMatch(input).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -130,6 +129,6 @@ public class XPathMatcherTests
|
||||
double result = matcher.IsMatch(xml).Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
result.Should().Be(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user