/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Http/Http.Abstractions/test/ProblemDetailsContextTests.cs
24 строки
702 B
bjornen77
Make ProblemDetails settable in ProblemDetailsContext (#48510)
31 май 2023, 05:09
Не верифицирован
31 май 2023, 05:09
c1f7320
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace Microsoft.AspNetCore.Http.Abstractions.Tests; public class ProblemDetailsContextTests { [Fact] public void ProblemDetailsPropertySetter_Should_SetProblemDetails() { // Arrange ProblemDetailsContext context = new() { HttpContext = new DefaultHttpContext() }; ProblemDetails problemDetails = new(); // Act context.ProblemDetails = problemDetails; // Assert Assert.Equal(problemDetails, context.ProblemDetails); } }