Skip to content

Commit 541b692

Browse files
committed
test: 更新单元测试
1 parent 1c0080d commit 541b692

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/UnitTest/Services/BootstrapBlazorRootRegisterServiceTest.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ public void Subscribe_Ok()
2828
var service = new BootstrapBlazorRootRegisterService();
2929
var identifier = new object();
3030
service.Subscribe(identifier, new BootstrapBlazorRootOutlet());
31-
var exception = Assert.ThrowsAny<InvalidOperationException>(() => service.Subscribe(identifier, new BootstrapBlazorRootOutlet()));
32-
Assert.Equal("There is already a subscriber to the content with the given root ID 'System.Object'.", exception.Message);
33-
34-
exception = Assert.ThrowsAny<InvalidOperationException>(() => service.Unsubscribe(new object()));
35-
Assert.Equal("The subscriber with the given root ID 'System.Object' is already unsubscribed.", exception.Message);
31+
service.Unsubscribe(new object());
3632
}
3733

3834
[Fact]

0 commit comments

Comments
 (0)