diff options
author | Bruno Oliveira <brunolins16@users.noreply.github.com> | 2022-07-07 20:44:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 20:44:31 +0300 |
commit | 3f578652218174a16198524112f6d80e04e8324a (patch) | |
tree | e05a4078d2d9dc0567bb3ba6fe72951275440981 /src/Http/Http.Results/test/ConflictResultTests.cs | |
parent | 202fafe68774e2a968d8b175c0fd3fb318778903 (diff) |
Introducing `I*HttpResult` interfaces (#42385)
* Initial design
* Updating API (API Review feedback)
* Public API updates
* Updating unit tests
* Updating unit tests
* Change `RawValue` to `Value`
* Update src/Http/Http.Abstractions/src/HttpResults/IContentTypeHttpResult.cs
Co-authored-by: Martin Costello <martin@martincostello.com>
* PR review
* Adding comment.
Co-authored-by: Martin Costello <martin@martincostello.com>
Diffstat (limited to 'src/Http/Http.Results/test/ConflictResultTests.cs')
-rw-r--r-- | src/Http/Http.Results/test/ConflictResultTests.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Http/Http.Results/test/ConflictResultTests.cs b/src/Http/Http.Results/test/ConflictResultTests.cs index 391e248f09..1ee5f5d280 100644 --- a/src/Http/Http.Results/test/ConflictResultTests.cs +++ b/src/Http/Http.Results/test/ConflictResultTests.cs @@ -74,6 +74,14 @@ public class ConflictResultTests Assert.Throws<ArgumentNullException>("context", () => PopulateMetadata<Conflict>(null)); } + [Fact] + public void ConflictObjectResult_Implements_IStatusCodeHttpResult_Correctly() + { + // Act & Assert + var result = Assert.IsAssignableFrom<IStatusCodeHttpResult>(new Conflict()); + Assert.Equal(StatusCodes.Status409Conflict, result.StatusCode); + } + private static void PopulateMetadata<TResult>(EndpointMetadataContext context) where TResult : IEndpointMetadataProvider => TResult.PopulateMetadata(context); |