File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,33 @@ public void CellTemplate_Ok()
5757 } ) ;
5858 }
5959
60+ [ Fact ]
61+ public void HeaderTemplate_Ok ( )
62+ {
63+ var cut = Context . RenderComponent < Calendar > ( builder =>
64+ {
65+ builder . Add ( a => a . ViewMode , CalendarViewMode . Month ) ;
66+ builder . Add ( a => a . HeaderTemplate , builder =>
67+ {
68+ builder . AddContent ( 0 , "HeaderTemplate" ) ;
69+ } ) ;
70+ builder . Add ( a => a . BodyTemplate , context => builder =>
71+ {
72+ builder . OpenElement ( 0 , "div" ) ;
73+ builder . AddAttribute ( 1 , "data-bb-value" , context . Values . Count ) ;
74+ builder . CloseElement ( ) ;
75+ } ) ;
76+ } ) ;
77+
78+ Assert . Contains ( "HeaderTemplate" , cut . Markup ) ;
79+ Assert . Contains ( "data-bb-value=\" 7\" " , cut . Markup ) ;
80+
81+ cut . SetParametersAndRender ( pb =>
82+ {
83+ pb . Add ( a => a . ViewMode , CalendarViewMode . Week ) ;
84+ } ) ;
85+ }
86+
6087 [ Fact ]
6188 public async Task ButtonClick_Ok ( )
6289 {
You can’t perform that action at this time.
0 commit comments