/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Middleware/Rewrite/test/PatternSegments/ServerProtocolSegmentTests.cs
26 строк
856 B
Shreyas Jejurkar
chore : Remove unwanted `using` statement (#39176)
02 янв 2022, 17:39
Не верифицирован
02 янв 2022, 17:39
c85baf8
Код
Авторство
О чём код?
// 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.Http.Features; using Microsoft.AspNetCore.Rewrite.PatternSegments; namespace Microsoft.AspNetCore.Rewrite.Tests.PatternSegments; public class ServerProtocolSegmentTests { [Fact] public void ServerProtocol_AssertSegmentIsCorrect() { // Arrange var segement = new ServerProtocolSegment(); var context = new RewriteContext { HttpContext = new DefaultHttpContext() }; context.HttpContext.Features.Set<IHttpRequestFeature>(new HttpRequestFeature { Protocol = "http" }); // Act var results = segement.Evaluate(context, null, null); // Assert Assert.Equal("http", results); } }