Пример #1
0
        public static void AssertValidOption(LabeledTag option, string name, string display, object value, bool isChecked = false)
        {
            Assert.Equal("label", option.TagName());
            Assert.Equal(display, option.Children.Skip(1).First().Text());
            Assert.Equal(display, option.Display);

            var input = option.InnerTag;
            Assert.Equal(option.FirstChild(), input);
            Assert.Equal("input", input.TagName());
            Assert.Equal("checkbox", input.Attr("type"));
            Assert.Equal(name, input.Attr("name"));
            Assert.True(input.ValueIsEqual(value));
            Assert.Equal(isChecked, input.HasAttr("checked"));
        }
        public static void AssertValidOption(LabeledTag option, string name, string display, object value, bool isChecked = false)
        {
            Assert.Equal("label", option.TagName());
            Assert.Equal(display, option.Children.Skip(1).First().Text());
            Assert.Equal(display, option.Display);

            var input = option.InnerTag;

            Assert.Equal(option.FirstChild(), input);
            Assert.Equal("input", input.TagName());
            Assert.Equal("checkbox", input.Attr("type"));
            Assert.Equal(name, input.Attr("name"));
            Assert.True(input.ValueIsEqual(value));
            Assert.Equal(isChecked, input.HasAttr("checked"));
        }