public void Unauthorized_ResultHasCorrectValues()
    {
        // Act
        var result = TypedResults.Unauthorized();

        // Assert
        Assert.Equal(StatusCodes.Status401Unauthorized, result.StatusCode);
    }
Exemple #2
0
 /// <summary>
 /// Produces a <see cref="StatusCodes.Status401Unauthorized"/> response.
 /// </summary>
 /// <returns>The created <see cref="IResult"/> for the response.</returns>
 public static IResult Unauthorized()
 => TypedResults.Unauthorized();