generated from Avanade/avanade-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- *Enhancement:* Where an `HttpRequest` is used for an Azure Functions `HttpTriggerTester` the passed `HttpRequest.PathAndQuery` is checked against that defined by the corresponding `HttpTriggerAttribute.Route` and will result in an error where different. The `HttpTrigger.WithRouteChecK` and `WithNoRouteCheck` methods control the path and query checking as needed.
- Loading branch information
Showing
18 changed files
with
441 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
233 changes: 226 additions & 7 deletions
233
src/UnitTestEx.Azure.Functions/Azure/Functions/HttpTriggerTester.cs
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
src/UnitTestEx.Azure.Functions/Azure/Functions/RouteCheckOption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace UnitTestEx.Azure.Functions | ||
{ | ||
/// <summary> | ||
/// Represents the route check option for the <see cref="HttpTriggerTester{TFunction}"/>. | ||
/// </summary> | ||
public enum RouteCheckOption | ||
{ | ||
/// <summary> | ||
/// No route check is required, | ||
/// </summary> | ||
None, | ||
|
||
/// <summary> | ||
/// The route should match the specified path excluding any query string. | ||
/// </summary> | ||
Path, | ||
|
||
/// <summary> | ||
/// The route should match the specified path including the query string. | ||
/// </summary> | ||
PathAndQuery, | ||
|
||
/// <summary> | ||
/// The route should start with the specified path and query string. | ||
/// </summary> | ||
PathAndQueryStartsWith, | ||
|
||
/// <summary> | ||
/// The route query (ignore path) should match the specified query string. | ||
/// </summary> | ||
Query, | ||
|
||
/// <summary> | ||
/// The route query (ignore path) should start with the specified query string. | ||
/// </summary> | ||
QueryStartsWith | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.