public void Should_append_template_if_both_commands_and_template_is_defined()
        {
            var template = new HtmlTemplate {Html = "aaaa"};
            var toolBarData = new GridToolBarData
                                      {
                                          Commands = new[] {new Mock<IGridActionCommand>().Object},
                                          Template = template
                                      };

            sectionBuilder.CreateToolBar(toolBarData);

            toolBarBuilder.Verify(tb => tb.CreateToolBar(template), Times.Once());
            toolBarBuilder.Verify(tb => tb.CreateToolBar(It.IsAny<IEnumerable<IGridButtonBuilder>>()),Times.Never());
        }
Ejemplo n.º 2
0
        public void Should_append_template_if_both_commands_and_template_is_defined()
        {
            var template = new HtmlTemplate {
                Html = "aaaa"
            };
            var toolBarData = new GridToolBarData
            {
                Commands = new[] { new Mock <IGridActionCommand>().Object },
                Template = template
            };

            sectionBuilder.CreateToolBar(toolBarData);

            toolBarBuilder.Verify(tb => tb.CreateToolBar(template), Times.Once());
            toolBarBuilder.Verify(tb => tb.CreateToolBar(It.IsAny <IEnumerable <IGridButtonBuilder> >()), Times.Never());
        }