public void is_authorized_value_false_makes_tag_hidden_regardless_of_visibility() { var tag = new HtmlTag("div").Authorized(false); tag.ToString().ShouldBeEmpty(); tag.Visible(true).ToString().ShouldBeEmpty(); tag.Visible(false).ToString().ShouldBeEmpty(); }
public void is_visible_set_to_true_by_default() { var tag = new HtmlTag("div"); tag.Visible().ShouldBeTrue(); tag.ToString().ShouldEqual("<div></div>"); }
public void should_not_be_visible_when_the_user_does_not_have_the_role() { var tag = new HtmlTag("span").VisibleForRoles("role10", "role4"); tag.Visible().ShouldBeFalse(); }
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(); }
public void should_be_visible_when_the_user_has_the_role() { var tag = new HtmlTag("span").VisibleForRoles("role1", "role4"); tag.Visible().ShouldBeTrue(); }