Skip to content

Commit

Permalink
#18: Synergy.Web.Api.Testing: Added method of ignoring request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinCelej committed May 16, 2024
1 parent 9062e89 commit 7c70e0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Web/Synergy.Web.Api.Testing/Json/Ignore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public static Ignore RequestMethod()
return new Ignore("$.request.method");
}

public static Ignore RequestHeaders(params string[] headers)
{
var ignore = new Ignore();
if (headers.Any() == false)
ignore.Append(new[] {"$.request.headers"});
ignore.Append(headers.Select(node=> $"$.request.headers.{node}"));
return ignore;
}

public static Ignore RequestDescription()
{
return new Ignore("$.request.description");
Expand Down

0 comments on commit 7c70e0c

Please sign in to comment.