Skip to content

Commit ce24b60

Browse files
committed
test: 更新单元测试
1 parent fa3e3d0 commit ce24b60

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/UnitTest/Components/TableColumnFilterTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ public void Filter_Ok()
7171
pb.Add(a => a.TableColumns, CreateCatTableColumns());
7272
});
7373
});
74+
75+
Context.RenderComponent<Filter<MultiFilter>>(pb =>
76+
{
77+
pb.Add(a => a.FilterParameters, new Dictionary<string, object>()
78+
{
79+
{ "Items", new List<SelectedItem>() }
80+
});
81+
});
7482
}
7583

7684
[Fact]

test/UnitTest/Components/TableNumberFilterTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ public async Task OnFilterAsync_Ok()
4040
[Fact]
4141
public async Task FilterAction_Ok()
4242
{
43-
var cut = Context.RenderComponent<NumberFilter<double?>>();
43+
var cut = Context.RenderComponent<NumberFilter<double?>>(pb =>
44+
{
45+
pb.Add(a => a.IsHeaderRow, true);
46+
});
4447
var filter = cut.Instance;
4548

4649
var newConditions = new FilterKeyValueAction()

0 commit comments

Comments
 (0)