use of hudson.util.FormValidation in project nodejs-plugin by jenkinsci.
the class NPMRegistryValidatorTest method test_empty_server_url.
@Test
public void test_empty_server_url() throws Exception {
DescriptorImpl descriptor = new DescriptorImpl();
FormValidation result = descriptor.doCheckUrl("");
assertThat(result.kind, is(Kind.ERROR));
assertThat(result.getMessage(), is(Messages.NPMRegistry_DescriptorImpl_emptyRegistryURL()));
}
use of hudson.util.FormValidation in project nodejs-plugin by jenkinsci.
the class NPMRegistryValidatorTest method test_empty_scopes.
@Test
public void test_empty_scopes() throws Exception {
DescriptorImpl descriptor = new DescriptorImpl();
FormValidation result = descriptor.doCheckScopes(true, "");
assertThat(result.kind, is(Kind.ERROR));
assertThat(result.getMessage(), is(Messages.NPMRegistry_DescriptorImpl_emptyScopes()));
}
use of hudson.util.FormValidation in project contrast-continuous-application-security-plugin by jenkinsci.
the class ContrastPluginConfigTest method testDoCheckApiKeyInvalid.
@Test
public void testDoCheckApiKeyInvalid() {
FormValidation result = descriptor.doCheckApiKey("");
assertEquals(result.kind, FormValidation.Kind.ERROR);
}
use of hudson.util.FormValidation in project contrast-continuous-application-security-plugin by jenkinsci.
the class ContrastPluginConfigTest method testDoCheckApiKeyValid.
@Test
public void testDoCheckApiKeyValid() {
FormValidation result = descriptor.doCheckApiKey("ABCDEFG");
assertEquals(result.kind, FormValidation.Kind.OK);
}
use of hudson.util.FormValidation in project contrast-continuous-application-security-plugin by jenkinsci.
the class ContrastPluginConfigTest method testDoCheckUsernameInvalid.
@Test
public void testDoCheckUsernameInvalid() {
FormValidation result = descriptor.doCheckUsername("");
assertEquals(result.kind, FormValidation.Kind.ERROR);
}
Aggregations