public void Unauthorized_ResultHasCorrectValues() { // Act var result = TypedResults.Unauthorized(); // Assert Assert.Equal(StatusCodes.Status401Unauthorized, result.StatusCode); }
/// <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();