/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Http/Http.Extensions/test/HttpMetricsEndpointConventionBuilderExtensionsTests.cs
29 строк
919 B
James Newton-King
Add disable HTTP metrics endpoint metadata (#56036)
12 июл 2024, 12:54
Не верифицирован
12 июл 2024, 12:54
639952a
Код
Авторство
О чём код?
// 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.Builder; using Microsoft.AspNetCore.Http.Metadata; namespace Microsoft.AspNetCore.Http.Extensions.Tests; public partial class HttpMetricsEndpointConventionBuilderExtensionsTests { [Fact] public void DisableHttpMetrics_AddsMetadata() { var builder = new TestEndointConventionBuilder(); builder.DisableHttpMetrics(); Assert.IsAssignableFrom<IDisableHttpMetricsMetadata>(Assert.Single(builder.Metadata)); } private sealed class TestEndointConventionBuilder : EndpointBuilder, IEndpointConventionBuilder { public void Add(Action<EndpointBuilder> convention) { convention(this); } public override Endpoint Build() => throw new NotImplementedException(); } }