File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -210,11 +210,21 @@ public void IsClearable_Ok()
210210 [ Fact ]
211211 public void ButtonTemplate_Ok ( )
212212 {
213+ SearchContext < string ? > ? val = null ;
213214 var cut = Context . RenderComponent < Search < string ? > > ( pb =>
214215 {
215- pb . Add ( a => a . ButtonTemplate , context => builder => builder . AddContent ( 0 , "button-template" ) ) ;
216+ pb . Add ( a => a . ButtonTemplate , context => builder =>
217+ {
218+ val = context ;
219+ builder . AddContent ( 0 , "button-template" ) ;
220+ } ) ;
216221 } ) ;
217222 cut . Contains ( "button-template" ) ;
223+ Assert . NotNull ( val ) ;
224+ Assert . NotNull ( val . Search ) ;
225+ Assert . Equal ( cut . Instance , val . Search ) ;
226+ Assert . NotNull ( val . OnSearchAsync ) ;
227+ Assert . NotNull ( val . OnClearAsync ) ;
218228
219229 cut . SetParametersAndRender ( pb =>
220230 {
You can’t perform that action at this time.
0 commit comments