Skip to content

Commit ee860c1

Browse files
committed
test: 补充单元测试提高覆盖率
1 parent e1e3d37 commit ee860c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/UnitTest/Services/TcpSocketFactoryTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Net;
88
using System.Net.Sockets;
99
using System.Reflection;
10+
using System.Text;
1011

1112
namespace UnitTest.Services;
1213

@@ -161,6 +162,9 @@ public async Task SendAsync_Cancel()
161162
var result = await client.SendAsync("test", null, cst.Token);
162163
Assert.False(result);
163164

165+
result = await client.SendAsync("test", Encoding.UTF8, cst.Token);
166+
Assert.False(result);
167+
164168
// 关闭连接
165169
StopTcpServer(server);
166170
}

0 commit comments

Comments
 (0)