public static void ShouldShowHide(this AjaxAction action, DocumentWrapper doc, bool visible) { var target = doc.Find("#" + action.TargetId); target.Should().NotBeNull("Could not find {0} in form", action.TargetId); action.Action.Should().Be("ShowHide", "action should be ShowHide"); action.Show.Should().Be(visible, "action should have Show=" + visible); }