generated from Avanade/avanade-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v3.27.3 - *Fixed:* The `ExecutionContext.Messages` were not being returned as intended within the `x-messages` HTTP Response header; enabled within the `ExtendedStatusCodeResult` and `ExtendedContentResult` on success only (status code `>= 200` and `<= 299`). Note these messages are JSON serialized as the underlying `MessageItemCollection` type. * ixed: The AgentTester has been updated to return a HttpResultAssertor where the operation returns a HttpResult to enable further assertions to be made on the Result itself. * Move files to correct namespace. * Add additional tests for assertor.
- Loading branch information
Showing
22 changed files
with
313 additions
and
60 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx | ||
|
||
using CoreEx; | ||
using CoreEx.Http; | ||
using UnitTestEx.Abstractions; | ||
|
||
namespace UnitTestEx.Assertors | ||
{ | ||
/// <summary> | ||
/// Represents the <see cref="HttpResult"/> test assert helper. | ||
/// </summary> | ||
/// <param name="owner">The owning <see cref="TesterBase"/>.</param> | ||
/// <param name="result">The <see cref="HttpResult"/>.</param> | ||
public class HttpResultAssertor(TesterBase owner, HttpResult result) : HttpResponseMessageAssertor(owner, result.ThrowIfNull(nameof(result)).Response) | ||
{ | ||
/// <summary> | ||
/// Gets the <see cref="HttpResult"/>. | ||
/// </summary> | ||
public HttpResult Result { get; private set; } = result; | ||
} | ||
} |
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,36 @@ | ||
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx | ||
|
||
using CoreEx; | ||
using CoreEx.Http; | ||
using System; | ||
using UnitTestEx.Abstractions; | ||
|
||
namespace UnitTestEx.Assertors | ||
{ | ||
/// <summary> | ||
/// Represents the <see cref="HttpResult{TValue}"/> test assert helper with a specified result <typeparamref name="TValue"/> <see cref="Type"/>. | ||
/// </summary> | ||
/// | ||
public class HttpResultAssertor<TValue> : HttpResponseMessageAssertor<TValue> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="HttpResultAssertor"/> class. | ||
/// </summary> | ||
/// <param name="owner">The owning <see cref="TesterBase"/>.</param> | ||
/// <param name="result">The <see cref="HttpResult"/>.</param> | ||
public HttpResultAssertor(TesterBase owner, HttpResult<TValue> result) : base(owner, result.ThrowIfNull(nameof(result)).Response) => Result = result; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="HttpResultAssertor"/> class. | ||
/// </summary> | ||
/// <param name="owner">The owning <see cref="TesterBase"/>.</param> | ||
/// <param name="value">The value already deserialized.</param> | ||
/// <param name="result"></param> | ||
public HttpResultAssertor(TesterBase owner, TValue value, HttpResult<TValue> result) : base(owner, value, result.ThrowIfNull(nameof(result)).Response) => Result = result; | ||
|
||
/// <summary> | ||
/// Gets the <see cref="HttpResult{TValue}"/>. | ||
/// </summary> | ||
public HttpResult<TValue> Result { get; private set; } | ||
} | ||
} |
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.