Skip to content

Commit b8700b7

Browse files
committed
test: 更新单元测试
1 parent da189b5 commit b8700b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/UnitTest/Components/TableTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,6 +2693,7 @@ public void ScrollMode_Ok()
26932693
var localizer = Context.Services.GetRequiredService<IStringLocalizer<Foo>>();
26942694
var cut = Context.RenderComponent<BootstrapBlazorRoot>(pb =>
26952695
{
2696+
pb.Add(a => a.EnableErrorLogger, false);
26962697
pb.AddChildContent<Table<Foo>>(pb =>
26972698
{
26982699
pb.Add(a => a.RenderMode, TableRenderMode.Table);
@@ -2710,6 +2711,13 @@ public void ScrollMode_Ok()
27102711
});
27112712
var virtualComponent = cut.FindComponent<Virtualize<Foo>>();
27122713
Assert.NotNull(virtualComponent);
2714+
2715+
var table = cut.FindComponent<Table<Foo>>();
2716+
var exception = Assert.Throws<InvalidOperationException>(() => table.SetParametersAndRender(pb =>
2717+
{
2718+
pb.Add(a => a.IsTree, true);
2719+
}));
2720+
Assert.NotNull(exception);
27132721
}
27142722

27152723
[Fact]

0 commit comments

Comments
 (0)