Java Code Examples for hudson.util.FormValidation#Kind

The following examples show how to use hudson.util.FormValidation#Kind . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormUtilsTest.java    From office-365-connector-plugin with Apache License 2.0 5 votes vote down vote up
@Test
public void isUrlValid_ValidatesUrl() {

    // given
    FormValidation formValidation = FormUtils.formValidateUrl(input);
    FormValidation.Kind kind = formValidation.kind;

    // when
    boolean output = FormUtils.isUrlValid(input);

    // then
    assertThat(kind).isEqualTo(expectedKind);
    assertThat(output).isEqualTo(expectedBoolean);
}
 
Example 2
Source File: MattermostNotifierTest.java    From jenkins-mattermost-plugin with MIT License 5 votes vote down vote up
public MattermostNotifierTest(
    MattermostServiceStub mattermostServiceStub,
    boolean response,
    FormValidation.Kind expectedResult) {
  this.mattermostServiceStub = mattermostServiceStub;
  this.response = response;
  this.expectedResult = expectedResult;
}
 
Example 3
Source File: JenkinsMatchers.java    From jenkins-test-harness with MIT License 4 votes vote down vote up
public static Matcher<FormValidation> hasKind(FormValidation.Kind kind) {
    return new FormValidationKindMatcher(kind);
}
 
Example 4
Source File: JenkinsMatchers.java    From jenkins-test-harness with MIT License 4 votes vote down vote up
public FormValidationKindMatcher(FormValidation.Kind kind) {
    kind.getClass();
    this.kind = kind;
}