On Tue, Apr 16, 2019 at 7:35 AM Mark Waite <
mark.ea...@gmail.com> wrote:
> extract those checks into package protected methods that I call from a test that configures a running Jenkins instance using a JenkinsRule.
Or just call them directly, since they would already be `public` and
you can assert the contents of a `FormValidation` easily enough. (Look
up the descriptor instance without casts via
`Jenkins.getDescriptor(Class)`.)
Generally speaking, Stapler is designed to let you test web methods as
plain Java calls whenever reasonable, by defining specialized subtypes
of `HttpResponse` that can be used as return values, and by accepting
`@QueryParameter` and `@AncestorInPath` arguments.
Using HtmlUnit to check form validation would be relatively painful,
and overkill.