public void RepeaterEmptyData_RenderedHtmlTest_ServerRendering()
        {
            Repeater createRepeater(RenderMode renderMode)
            {
                var repeater = new Repeater()
                {
                    ItemTemplate      = new DelegateTemplate((f, s, c) => c.Children.Add(new HtmlGenericControl("ITEM_TAG"))),
                    EmptyDataTemplate = new DelegateTemplate((f, s, c) => c.Children.Add(new HtmlGenericControl("EMPTY_DATA"))),
                    DataSource        = ValueBindingExpression.CreateThisBinding <string[]>(Configuration.ServiceProvider.GetRequiredService <BindingCompilationService>(), null),
                    RenderWrapperTag  = false
                };

                repeater.SetValue(RenderSettings.ModeProperty, renderMode);
                return(repeater);
            }

            var viewModel  = new string[] { };
            var clientHtml = InvokeLifecycleAndRender(createRepeater(RenderMode.Client), CreateContext(viewModel));

            Assert.IsTrue(clientHtml.Contains("<ITEM_TAG"));
            Assert.IsTrue(clientHtml.Contains("<EMPTY_DATA"));
            Assert.IsTrue(!clientHtml.Contains("<div"));
            Assert.IsTrue(clientHtml.Contains("<!-- ko "));

            var serverHtml = InvokeLifecycleAndRender(createRepeater(RenderMode.Server), CreateContext(viewModel));

            Assert.IsTrue(serverHtml.Contains("<EMPTY_DATA"));
            Assert.IsTrue(!serverHtml.Contains("<div"));
        }
        public void BindingGroup_MultipleBindings_InProperOrder()
        {
            var textbox = new OrderedDataBindTextBox();

            textbox.SetBinding(TextBox.TextProperty,
                               ValueBindingExpression.CreateThisBinding <string>(Configuration.ServiceProvider.GetRequiredService <BindingCompilationService>(), null));

            var html = InvokeLifecycleAndRender(textbox, CreateContext(string.Empty));

            StringAssert.Contains(html.Replace(" ", ""), "data-bind=\"first:true,value:$rawData,second:true\"");
        }