You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FluentAssertions.Web.Serializers.NewtonsoftJson/FluentAssertions.Web.Serializers.NewtonsoftJson.csproj
Copy file name to clipboardExpand all lines: src/FluentAssertions.Web/FluentAssertions.Web.csproj
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
<ProjectSdk="Microsoft.NET.Sdk">
2
2
3
3
<PropertyGroup>
4
-
<PackageDescription>
5
-
This is a FluentAssertions extension over the HttpResponseMessage object. It provides assertions specific to HTTP responses and outputs rich erros messages when the tests fail, so less time with debugging is spent.
6
-
</PackageDescription>
4
+
<PackageId>FluentAssertions.Web.v8</PackageId>
5
+
<PackageDescription>
6
+
This is a FluentAssertions extension over the HttpResponseMessage object. It provides assertions specific to HTTP responses and outputs rich erros messages when the tests fail, so less time with debugging is spent.
/// Asserts that an existing HTTP header in a HTTP response contains at least a value that matches a wildcard pattern.
@@ -37,7 +38,7 @@ public AndConstraint<HeadersAssertions> Match(string expectedWildcardValue, stri
37
38
{
38
39
Guard.ThrowIfArgumentIsNull(expectedWildcardValue,nameof(expectedWildcardValue),"Cannot verify a HTTP header to be a value against a <null> value. Use And.BeEmpty to test if the HTTP header has no values.");
39
40
40
-
Execute.Assertion
41
+
CurrentAssertionChain
41
42
.ForCondition(Subjectis not null)
42
43
.BecauseOf(because,becauseArgs)
43
44
.FailWith("Expected a {context:response} to assert{reason}, but found <null>.");
@@ -51,7 +52,7 @@ public AndConstraint<HeadersAssertions> Match(string expectedWildcardValue, stri
51
52
return!scope.Discard().Any();
52
53
});
53
54
54
-
Execute.Assertion
55
+
CurrentAssertionChain
55
56
.BecauseOf(because,becauseArgs)
56
57
.ForCondition(matchFound)
57
58
.FailWith("Expected {context:response} to contain "+
@@ -78,7 +79,7 @@ public AndConstraint<HeadersAssertions> BeEmpty(string because = "", params obje
78
79
{
79
80
varheaderValues=Subject.GetHeaderValues(_header);
80
81
81
-
Execute.Assertion
82
+
CurrentAssertionChain
82
83
.BecauseOf(because,becauseArgs)
83
84
.ForCondition(!headerValues.Any())
84
85
.FailWith("Expected {context:response} to contain "+
@@ -105,7 +106,7 @@ public AndConstraint<HeadersAssertions> NotBeEmpty(string because = "", params o
105
106
{
106
107
varheaderValues=Subject.GetHeaderValues(_header);
107
108
108
-
Execute.Assertion
109
+
CurrentAssertionChain
109
110
.BecauseOf(because,becauseArgs)
110
111
.ForCondition(headerValues.Any())
111
112
.FailWith("Expected {context:response} to contain "+
@@ -151,7 +152,7 @@ public AndConstraint<HeadersAssertions> BeValues(IEnumerable<string> expectedVal
151
152
failures=scope.Discard();
152
153
}
153
154
154
-
Execute.Assertion
155
+
CurrentAssertionChain
155
156
.BecauseOf(because,becauseArgs)
156
157
.ForCondition(failures.Length==0)
157
158
.FailWith("Expected {context:response} to contain "+
@@ -182,7 +183,7 @@ public AndConstraint<HeadersAssertions> BeValue(string expectedValue,
182
183
{
183
184
Guard.ThrowIfArgumentIsNullOrEmpty(expectedValue,nameof(expectedValue),"Cannot verify a HTTP header to be a value against a <null> or empty value. Use And.BeEmpty to test if the HTTP header has no value.");
0 commit comments