@Test public void shouldRejectWholeListIfASingleNetworkItemIsInvalid() { AccessList al = new AccessList(); al.getNetworkItems().add(initNetworkItem("192.168.3.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.54/32", null, null)); al.getNetworkItems().add(initNetworkItem("::/32", "DENY", null)); ValidatorResult result = alValidator.validate(al, POST); assertFalse(resultMessage(result, POST), result.passedValidation()); result = alValidator.validate(al, PUT); assertFalse(resultMessage(result, PUT), result.passedValidation()); }
@Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); @Override ValidatorResult validate(AccessList accessList, Object httpRequestType); @Override Validator<AccessList> getValidator(); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); @Override ValidatorResult validate(AccessList accessList, Object httpRequestType); @Override Validator<AccessList> getValidator();  }