Skip to content

Commit 48082ab

Browse files
committed
test: 更新单元测试
1 parent 132f5dd commit 48082ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/UnitTest/Components/ListViewTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public async Task ListView_Ok()
7777
public async Task Pageable_Ok()
7878
{
7979
var triggerByPage = false;
80+
var pageIndex = 0;
8081
var items = Enumerable.Range(1, 6).Select(i => new Product()
8182
{
8283
ImageUrl = $"images/Pic{i}.jpg",
@@ -87,6 +88,7 @@ public async Task Pageable_Ok()
8788
{
8889
pb.Add(a => a.OnQueryAsync, option =>
8990
{
91+
pageIndex = option.PageIndex;
9092
triggerByPage = option.IsTriggerByPagination;
9193
return Task.FromResult(new QueryData<Product>()
9294
{
@@ -98,6 +100,7 @@ public async Task Pageable_Ok()
98100
pb.Add(a => a.PageItems, 2);
99101
});
100102
Assert.False(triggerByPage);
103+
Assert.Equal(1, pageIndex);
101104

102105
var pages = cut.FindAll(".page-link");
103106
Assert.Equal(5, pages.Count);

0 commit comments

Comments
 (0)