File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,31 @@ public void Items_Ok()
3636 } ) ;
3737 }
3838
39+ [ Fact ]
40+ public async Task QueryAsync_Ok ( )
41+ {
42+ var query = false ;
43+ var localizer = Context . Services . GetRequiredService < IStringLocalizer < Foo > > ( ) ;
44+ var items = Foo . GenerateFoo ( localizer , 4 ) ;
45+ var cut = Context . RenderComponent < BootstrapBlazorRoot > ( pb =>
46+ {
47+ pb . AddChildContent < SelectTable < Foo > > ( pb =>
48+ {
49+ pb . Add ( a => a . AutoGenerateColumns , false ) ;
50+ pb . Add ( a => a . OnQueryAsync , options =>
51+ {
52+ query = true ;
53+ return OnFilterQueryAsync ( options , items ) ;
54+ } ) ;
55+ pb . Add ( a => a . GetTextCallback , foo => foo . Name ) ;
56+ } ) ;
57+ } ) ;
58+ var table = cut . FindComponent < SelectTable < Foo > > ( ) ;
59+ query = false ;
60+ await cut . InvokeAsync ( table . Instance . QueryAsync ) ;
61+ Assert . True ( query ) ;
62+ }
63+
3964 [ Fact ]
4065 public async Task IsClearable_Ok ( )
4166 {
You can’t perform that action at this time.
0 commit comments