Esempio n. 1
0
        private void VerifyOption(string name, object value, object text, HtmlNode input, HtmlNode label)
        {
            input.ShouldBeNamed(HtmlTag.Input);
            input.ShouldHaveAttribute(HtmlAttribute.Name).WithValue(name);
            input.ShouldHaveAttribute(HtmlAttribute.Type).WithValue(HtmlInputType.Radio);
            input.ShouldHaveAttribute(HtmlAttribute.Value).WithValue(value.ToString());

            label.ShouldBeNamed(HtmlTag.Label);
            label.ShouldHaveInnerTextEqual(text.ToString());
        }
Esempio n. 2
0
 internal static void VerifyOption(string name, object value, object text, HtmlNode input, HtmlNode label, bool isChecked)
 {
     input.ShouldBeNamed(HtmlTag.Input);
     input.ShouldHaveAttribute(HtmlAttribute.Name).WithValue(name);
     input.ShouldHaveAttribute(HtmlAttribute.Type).WithValue(HtmlInputType.Radio);
     input.ShouldHaveAttribute(HtmlAttribute.Value).WithValue(value.ToString());
     if(isChecked)
     {
         input.ShouldHaveAttribute(HtmlAttribute.Checked).WithValue(HtmlAttribute.Checked);
     }
     else
     {
         input.ShouldNotHaveAttribute(HtmlAttribute.Checked);
     }
     label.ShouldBeNamed(HtmlTag.Label);
     label.ShouldHaveInnerTextEqual(text.ToString());
 }