/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Middleware/Rewrite/test/ApacheModRewrite/RuleRegexParserTest.cs
29 строк
843 B
Pranav K
Bump up warning level for CA1822 (#39436)
11 янв 2022, 18:47
Не верифицирован
11 янв 2022, 18:47
2862028
Код
Авторство
О чём код?
// 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.Rewrite.ApacheModRewrite; namespace Microsoft.AspNetCore.Rewrite.Tests.ModRewrite; public class RuleRegexParserTest { [Fact] public void RuleRegexParser_ShouldThrowOnNull() { Assert.Throws<FormatException>(() => RuleRegexParser.ParseRuleRegex(null)); } [Fact] public void RuleRegexParser_ShouldThrowOnEmpty() { Assert.Throws<FormatException>(() => RuleRegexParser.ParseRuleRegex(string.Empty)); } [Fact] public void RuleRegexParser_RegularRegexExpression() { var results = RuleRegexParser.ParseRuleRegex("(.*)"); Assert.False(results.Invert); Assert.Equal("(.*)", results.Operand); } }