use of hudson.util.FormValidation in project contrast-continuous-application-security-plugin by jenkinsci.
the class ContrastPluginConfigTest method testDoCheckUsernameValid.
@Test
public void testDoCheckUsernameValid() {
FormValidation result = descriptor.doCheckUsername("contrast_admin");
assertEquals(result.kind, FormValidation.Kind.OK);
}
use of hudson.util.FormValidation in project contrast-continuous-application-security-plugin by jenkinsci.
the class ThresholdConditionTest method testDoCheckThresholdCountValid.
@Test
public void testDoCheckThresholdCountValid() {
FormValidation result = descriptor.doCheckThresholdCount("10");
assertEquals(result.kind, FormValidation.Kind.OK);
}
use of hudson.util.FormValidation in project nodejs-plugin by jenkinsci.
the class NPMRegistryValidatorTest method test_scopes_ok.
@Test
public void test_scopes_ok() throws Exception {
DescriptorImpl descriptor = new DescriptorImpl();
FormValidation result = descriptor.doCheckScopes(true, "scope1 scope2 scope3");
assertThat(result.kind, is(Kind.OK));
}
use of hudson.util.FormValidation in project nodejs-plugin by jenkinsci.
the class NPMRegistryValidatorTest method test_server_url_invalid_protocol.
@Test
public void test_server_url_invalid_protocol() throws Exception {
DescriptorImpl descriptor = new DescriptorImpl();
FormValidation result = descriptor.doCheckUrl("hpp://acme.com/root");
assertThat(result.kind, is(Kind.ERROR));
assertThat(result.getMessage(), is(Messages.NPMRegistry_DescriptorImpl_invalidRegistryURL()));
}
use of hudson.util.FormValidation in project nodejs-plugin by jenkinsci.
the class NPMRegistryValidatorTest method test_invalid_scopes.
@Test
public void test_invalid_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_invalidScopes()));
}
Aggregations