Skip to content

Commit 50f008e

Browse files
committed
test: 增加单元测试
1 parent dc8e800 commit 50f008e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/UnitTest/Services/BrowserFingerServiceTest.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,13 @@ public async Task GetFingerCodeAsync_Ok()
1515
var code = await service.GetFingerCodeAsync();
1616
Assert.Equal("9527", code);
1717
}
18+
19+
[Fact]
20+
public async Task GetClientHubIdAsync_Ok()
21+
{
22+
Context.JSInterop.Setup<string?>("getClientHubId").SetResult("9528");
23+
var service = Context.Services.GetRequiredService<IBrowserFingerService>();
24+
var code = await service.GetClientHubIdAsync();
25+
Assert.Equal("9528", code);
26+
}
1827
}

0 commit comments

Comments
 (0)