Skip to content

Commit 77aead2

Browse files
committed
test: 更新单元测试
1 parent c72d510 commit 77aead2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/UnitTestDocs/MenuTest.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

5-
using BootstrapBlazor.Localization.Json;
65
using Microsoft.Extensions.Configuration;
76
using Microsoft.Extensions.DependencyInjection;
87
using Microsoft.Extensions.Options;
@@ -13,9 +12,9 @@ namespace UnitTestDocs;
1312

1413
public partial class MenuTest
1514
{
16-
private ITestOutputHelper _logger;
17-
private IServiceProvider _serviceProvider;
18-
private IEnumerable<Type> _routerTable;
15+
private readonly ITestOutputHelper _logger;
16+
private readonly IServiceProvider _serviceProvider;
17+
private readonly IEnumerable<Type> _routerTable;
1918

2019
public MenuTest(ITestOutputHelper logger)
2120
{
@@ -149,7 +148,7 @@ static string ReplacePayload(string payload, LocalizedString l) => payload
149148

150149
static string RemoveBlockStatement(string payload, string removeString)
151150
{
152-
var index = payload.IndexOf(removeString);
151+
var index = payload.IndexOf(removeString, StringComparison.Ordinal);
153152
if (index > -1)
154153
{
155154
var end = payload.IndexOf("\n", index, StringComparison.OrdinalIgnoreCase);

0 commit comments

Comments
 (0)