本文整理汇总了C#中InputBuilder.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# InputBuilder.ToString方法的具体用法?C# InputBuilder.ToString怎么用?C# InputBuilder.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputBuilder
的用法示例。
在下文中一共展示了InputBuilder.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Should_be_able_to_Generate_the_Password_Box
public void Should_be_able_to_Generate_the_Password_Box()
{
IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD).Value("Satish");
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
cq.Val().Should().Be("Satish");
}
示例2: Should_be_able_to_Generate_the_TextBox_with_the_PlaceHolder
public void Should_be_able_to_Generate_the_TextBox_with_the_PlaceHolder()
{
ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).WithPlaceholder("SomeText");
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr("name").Should().Be("Name");
cq.Attr("placeholder").Should().Be("SomeText");
}
示例3: Should_be_able_to_Generate_Text_With_the_type_Text_box
public void Should_be_able_to_Generate_Text_With_the_type_Text_box()
{
ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish");
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr("name").Should().Be("Name");
cq.Val().Should().Be("Satish");
}
示例4: Should_be_able_to_add_Id_to_the_property_With_the_Generic_Name
public void Should_be_able_to_add_Id_to_the_property_With_the_Generic_Name()
{
IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD)
.Class("cssclass");
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
cq.Attr(HTMLATTRIBUTE.CLASS).Should().Be("cssclass");
}
示例5: Should_be_able_to_Generate_the_Text_With_Disabled_and_ReadOnly_TextBox
public void Should_be_able_to_Generate_the_Text_With_Disabled_and_ReadOnly_TextBox()
{
ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish").Disabled(true).IsReadOnly(true);
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr("name").Should().Be("Name");
cq.Attr("disabled").Should().Be("disabled");
cq.Attr("readonly").Should().Be("readonly");
cq.Val().Should().Be("Satish");
}
示例6: Should_be_able_to_Generate_the_Text_With_AutoComplete_and_AutoFoucs_TextBox
public void Should_be_able_to_Generate_the_Text_With_AutoComplete_and_AutoFoucs_TextBox()
{
ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT)
.Value("Satish")
.EnableAutoComplete(true)
.AutoFocus(true);
string htmlTextBox = textbox.ToString();
var cq = CQ.Create(htmlTextBox);
cq.Attr("name").Should().Be("Name");
cq.Attr("AutoFocus").Should().Be("autofocus");
cq.Attr("autocomplete").Should().Be("on");
cq.Val().Should().Be("Satish");
}