Skip to content

Commit d414a1b

Browse files
committed
test: 增加单元测试
1 parent 66c8b36 commit d414a1b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/UnitTest/Components/LayoutTest.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ public void IsFixedFooter_OK()
5252
[Fact]
5353
public void IsFixedTabHeader_OK()
5454
{
55-
var cut = Context.RenderComponent<Layout>();
55+
var cut = Context.RenderComponent<Layout>(pb =>
56+
{
57+
pb.Add(a => a.Side, new RenderFragment(builder =>
58+
{
59+
builder.AddContent(0, "test");
60+
}));
61+
pb.Add(a => a.Menus, new MenuItem[] { new() { Url = "/" } });
62+
63+
});
5664
Assert.DoesNotContain("is-fixed-tab", cut.Markup);
5765

5866
cut.SetParametersAndRender(pb => pb.Add(a => a.IsFixedTabHeader, true));

0 commit comments

Comments
 (0)