use of com.sun.enterprise.admin.servermgmt.DomainConfig in project Payara by payara.
the class TestDomainPortValidator method testForNegativePort.
@Test(expectedExceptions = DomainException.class)
public void testForNegativePort() throws Exception {
DomainConfig domainConfig = new DomainConfig("test", null);
domainConfig.add(DomainConfig.K_VALIDATE_PORTS, Boolean.TRUE);
domainConfig.add(DomainConfig.K_ADMIN_PORT, "-2");
_portValidator = new DomainPortValidator(domainConfig, new Properties());
_portValidator.validateAndSetPorts();
}
use of com.sun.enterprise.admin.servermgmt.DomainConfig in project Payara by payara.
the class TestDomainPortValidator method testForPortValueZero.
@Test(expectedExceptions = DomainException.class)
public void testForPortValueZero() throws Exception {
DomainConfig domainConfig = new DomainConfig("test", null);
domainConfig.add(DomainConfig.K_VALIDATE_PORTS, Boolean.TRUE);
domainConfig.add(DomainConfig.K_ADMIN_PORT, "0");
_portValidator = new DomainPortValidator(domainConfig, new Properties());
_portValidator.validateAndSetPorts();
}
Aggregations