@@ -167,17 +167,17 @@ public async Task CheckCascadeState_Ok()
167167 pb . Add ( a => a . Items , nodes ) ;
168168 pb . Add ( a => a . ShowCheckbox , true ) ;
169169 } ) ;
170- var checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
170+ var checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
171171 await cut . InvokeAsync ( ( ) => checkboxes [ 1 ] . Instance . SetState ( CheckboxState . Checked ) ) ;
172172 await cut . InvokeAsync ( ( ) => checkboxes [ 2 ] . Instance . SetState ( CheckboxState . Checked ) ) ;
173173
174174 // Indeterminate
175175 await cut . InvokeAsync ( ( ) => checkboxes [ 4 ] . Instance . SetState ( CheckboxState . Checked ) ) ;
176176
177- checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
178- Assert . Equal ( CheckboxState . Checked , checkboxes [ 0 ] . Instance . State ) ;
179- Assert . Equal ( CheckboxState . Indeterminate , checkboxes [ 3 ] . Instance . State ) ;
180- Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 5 ] . Instance . State ) ;
177+ checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
178+ Assert . Equal ( CheckboxState . Checked , checkboxes [ 0 ] . Instance . Value . CheckedState ) ;
179+ Assert . Equal ( CheckboxState . Indeterminate , checkboxes [ 3 ] . Instance . Value . CheckedState ) ;
180+ Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 5 ] . Instance . Value . CheckedState ) ;
181181 }
182182
183183 [ Fact ]
@@ -198,7 +198,7 @@ public async Task OnStateChanged_Ok()
198198 pb . Add ( a => a . Items , items ) ;
199199 } ) ;
200200
201- var checkbox = cut . FindComponent < Checkbox < CheckboxState > > ( ) ;
201+ var checkbox = cut . FindComponent < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
202202 await cut . InvokeAsync ( checkbox . Instance . TriggerClick ) ;
203203 cut . DoesNotContain ( "fa-solid fa-font-awesome" ) ;
204204 cut . Contains ( "Test-Class" ) ;
@@ -232,7 +232,7 @@ public async Task OnMaxSelectedCountExceed_Ok()
232232 return Task . CompletedTask ;
233233 } ) ;
234234 } ) ;
235- var checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
235+ var checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
236236 Assert . Equal ( 3 , checkboxes . Count ) ;
237237
238238 await cut . InvokeAsync ( async ( ) =>
@@ -324,7 +324,7 @@ public async Task OnExpandRowAsync_CheckCascadeState_Ok()
324324 } ) ;
325325 } ) ;
326326
327- var checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
327+ var checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
328328
329329 // 初始状态
330330 Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 0 ] . Instance . State ) ;
@@ -336,16 +336,16 @@ public async Task OnExpandRowAsync_CheckCascadeState_Ok()
336336 cut . WaitForState ( ( ) => cut . Instance . Items [ 0 ] . Items . Count > 0 ) ;
337337
338338 // 展开状态-级联选中-子级
339- checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
340- Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 1 ] . Instance . State ) ;
341- Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 2 ] . Instance . State ) ;
339+ checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
340+ Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 1 ] . Instance . Value . CheckedState ) ;
341+ Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 2 ] . Instance . Value . CheckedState ) ;
342342
343343 // 级联选中-父级
344344 await cut . InvokeAsync ( ( ) => checkboxes [ 1 ] . Instance . SetState ( CheckboxState . Checked ) ) ;
345- Assert . Equal ( CheckboxState . Indeterminate , checkboxes [ 0 ] . Instance . State ) ;
345+ Assert . Equal ( CheckboxState . Indeterminate , checkboxes [ 0 ] . Instance . Value . CheckedState ) ;
346346
347347 await cut . InvokeAsync ( ( ) => checkboxes [ 2 ] . Instance . SetState ( CheckboxState . Checked ) ) ;
348- Assert . Equal ( CheckboxState . Checked , checkboxes [ 0 ] . Instance . State ) ;
348+ Assert . Equal ( CheckboxState . Checked , checkboxes [ 0 ] . Instance . Value . CheckedState ) ;
349349 }
350350
351351 [ Fact ]
@@ -411,7 +411,7 @@ public async Task OnExpandRowAsync_ManualCheckState_Ok()
411411 } ) ;
412412 } ) ;
413413
414- var checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
414+ var checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
415415
416416 // 初始状态
417417 Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 0 ] . Instance . State ) ;
@@ -423,7 +423,7 @@ public async Task OnExpandRowAsync_ManualCheckState_Ok()
423423 cut . WaitForState ( ( ) => cut . Instance . Items [ 0 ] . Items . Count > 0 ) ;
424424
425425 // 展开状态
426- checkboxes = cut . FindComponents < Checkbox < CheckboxState > > ( ) ;
426+ checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
427427 Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 0 ] . Instance . State ) ;
428428 Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 1 ] . Instance . State ) ;
429429 Assert . Equal ( CheckboxState . Checked , checkboxes [ 2 ] . Instance . State ) ;
@@ -793,7 +793,7 @@ public async Task ClearCheckedItems_Ok()
793793 pb . Add ( a => a . ShowCheckbox , true ) ;
794794 } ) ;
795795
796- var checkbox = cut . FindComponent < Checkbox < CheckboxState > > ( ) ;
796+ var checkbox = cut . FindComponent < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
797797 await cut . InvokeAsync ( checkbox . Instance . TriggerClick ) ;
798798
799799 Assert . Contains ( "is-checked" , cut . Markup ) ;
0 commit comments