Skip to content

Commit 0f2d691

Browse files
committed
test: 更新 Logging 单元测试
1 parent 9dcc6e8 commit 0f2d691

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

test/UnitTestTcpSocket/SocketLoggingTest.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

55
using BootstrapBlazor.Socket.Logging;
6-
using Microsoft.Extensions.Logging;
76

87
namespace UnitTestTcpSocket;
98

@@ -16,10 +15,5 @@ public void Logger_Ok()
1615
SocketLogging.LogInformation("Information");
1716
SocketLogging.LogWarning("Warning");
1817
SocketLogging.LogDebug("Debug");
19-
20-
SocketLogging.Init(new LoggerFactory().CreateLogger("SocketLoggingTest"));
21-
SocketLogging.LogInformation("Information");
22-
SocketLogging.LogWarning("Warning");
23-
SocketLogging.LogDebug("Debug");
2418
}
2519
}

test/UnitTestTcpSocket/TcpSocketFactoryTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
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.Socket.Logging;
56
using Microsoft.Extensions.Logging;
67
using System.Buffers;
78
using System.Net;
@@ -43,6 +44,10 @@ public async Task GetOrCreate_Ok()
4344

4445
await client5.DisposeAsync();
4546
await factory.DisposeAsync();
47+
48+
SocketLogging.LogWarning("Warning");
49+
SocketLogging.LogDebug("Debug");
50+
SocketLogging.LogInformation("Information");
4651
}
4752

4853
[Fact]

0 commit comments

Comments
 (0)