File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the Apache 2.0 License
3+ // See the LICENSE file in the project root for more information.
4+ // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
5+
6+ namespace UnitTest . Components ;
7+
8+ public class FilterLogicItemTest : BootstrapBlazorTestBase
9+ {
10+ [ Fact ]
11+ public async Task FilterLogicItem_Ok ( )
12+ {
13+ var logic = FilterLogic . And ;
14+ var cut = Context . RenderComponent < FilterLogicItem > ( pb =>
15+ {
16+ pb . Add ( a => a . Logic , FilterLogic . And ) ;
17+ pb . Add ( a => a . LogicChanged , EventCallback . Factory . Create < FilterLogic > ( this , v =>
18+ {
19+ logic = v ;
20+ } ) ) ;
21+ } ) ;
22+
23+ var select = cut . FindComponent < Select < FilterLogic > > ( ) ;
24+ await cut . InvokeAsync ( ( ) => select . Instance . SetValue ( FilterLogic . Or ) ) ;
25+ Assert . Equal ( FilterLogic . Or , logic ) ;
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments