本文整理汇总了C#中HtmlTag.WrapWith方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTag.WrapWith方法的具体用法?C# HtmlTag.WrapWith怎么用?C# HtmlTag.WrapWith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTag
的用法示例。
在下文中一共展示了HtmlTag.WrapWith方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: wrap_with_another_tag_returns_the_wrapping_tag_with_the_original_as_its_child
public void wrap_with_another_tag_returns_the_wrapping_tag_with_the_original_as_its_child()
{
var tag = new HtmlTag("a");
var wrapper = new HtmlTag("span");
tag.WrapWith(wrapper).ShouldBeTheSameAs(wrapper);
wrapper.FirstChild().ShouldBeTheSameAs(tag);
}
示例2: wrap_with_returns_a_new_tag_with_the_original_as_the_first_child
public void wrap_with_returns_a_new_tag_with_the_original_as_the_first_child()
{
var tag = new HtmlTag("a");
var wrapped = tag.WrapWith("span");
wrapped.ShouldNotBeTheSameAs(tag);
wrapped.TagName().ShouldEqual("span");
wrapped.FirstChild().ShouldBeTheSameAs(tag);
}
示例3: wrapped_tag_will_not_be_rendered_if_the_original_tag_was_not_to_be_rendered
public void wrapped_tag_will_not_be_rendered_if_the_original_tag_was_not_to_be_rendered()
{
var tag = new HtmlTag("a").Render(false);
tag.WrapWith("span").Render().ShouldBeFalse();
}
示例4: wrapped_tag_will_not_be_authorized_if_the_original_tag_was_not_authorized
public void wrapped_tag_will_not_be_authorized_if_the_original_tag_was_not_authorized()
{
var tag = new HtmlTag("a").Authorized(false);
tag.WrapWith("span").Authorized().ShouldBeFalse();
}
示例5: wrap_with_another_tag_returns_the_second_tag_with_the_first_as_the_child
public void wrap_with_another_tag_returns_the_second_tag_with_the_first_as_the_child()
{
var tag = new HtmlTag("a");
var wrapper = new HtmlTag("span");
tag.WrapWith(wrapper).ShouldBeTheSameAs(wrapper);
wrapper.FirstChild().ShouldBeTheSameAs(tag);
}
示例6: wrap_with_copies_the_visibility_from_the_inner_value_positive_case
public void wrap_with_copies_the_visibility_from_the_inner_value_positive_case()
{
var tag = new HtmlTag("a");
tag.Visible().ShouldBeTrue();
tag.WrapWith("span").Visible().ShouldBeTrue();
}
示例7: wrap_with_copies_the_authorization_from_the_inner_value_positive_case
public void wrap_with_copies_the_authorization_from_the_inner_value_positive_case()
{
var tag = new HtmlTag("a");
tag.Authorized().ShouldBeTrue();
tag.WrapWith("span").Authorized().ShouldBeTrue();
}