@Test public void testValidateNoRefresh() { final boolean isCacheEnabled = true; final boolean isPushEnabled = true; final boolean isRefreshEnabled = false; final boolean isUsingFilePath = false; tested.validate(csvDataSetDef, isCacheEnabled, isPushEnabled, isRefreshEnabled, isUsingFilePath); verify(validator, times(1)).validate(csvDataSetDef, DataSetDefBasicAttributesGroup.class, DataSetDefProviderTypeGroup.class, DataSetDefCacheRowsValidation.class, DataSetDefPushSizeValidation.class, CSVDataSetDefValidation.class, CSVDataSetDefFileURLValidation.class); }
@Override public Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params) { assert params != null && params.length == 1; final Boolean isFilePath = (Boolean) params[0]; Set<ConstraintViolation<CSVDataSetDef>> _violations = validator.validate(dataSetDef, getValidationGroups(isCacheEnabled, isPushEnabled, isRefreshEnabled, CSVDataSetDefValidation.class, isFilePath ? CSVDataSetDefFilePathValidation.class : CSVDataSetDefFileURLValidation.class)); return toIterable(_violations); }
CSVDataSetDefValidator extends AbstractDataSetDefValidator<CSVDataSetDef> { @Override public Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params) { assert params != null && params.length == 1; final Boolean isFilePath = (Boolean) params[0]; Set<ConstraintViolation<CSVDataSetDef>> _violations = validator.validate(dataSetDef, getValidationGroups(isCacheEnabled, isPushEnabled, isRefreshEnabled, CSVDataSetDefValidation.class, isFilePath ? CSVDataSetDefFilePathValidation.class : CSVDataSetDefFileURLValidation.class)); return toIterable(_violations); } }
CSVDataSetDefValidator extends AbstractDataSetDefValidator<CSVDataSetDef> { @Override public Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params) { assert params != null && params.length == 1; final Boolean isFilePath = (Boolean) params[0]; Set<ConstraintViolation<CSVDataSetDef>> _violations = validator.validate(dataSetDef, getValidationGroups(isCacheEnabled, isPushEnabled, isRefreshEnabled, CSVDataSetDefValidation.class, isFilePath ? CSVDataSetDefFilePathValidation.class : CSVDataSetDefFileURLValidation.class)); return toIterable(_violations); } @Inject  CSVDataSetDefValidator( Validator validator ); }
CSVDataSetDefValidator extends AbstractDataSetDefValidator<CSVDataSetDef> { @Override public Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params) { assert params != null && params.length == 1; final Boolean isFilePath = (Boolean) params[0]; Set<ConstraintViolation<CSVDataSetDef>> _violations = validator.validate(dataSetDef, getValidationGroups(isCacheEnabled, isPushEnabled, isRefreshEnabled, CSVDataSetDefValidation.class, isFilePath ? CSVDataSetDefFilePathValidation.class : CSVDataSetDefFileURLValidation.class)); return toIterable(_violations); } @Inject  CSVDataSetDefValidator( Validator validator ); @Override DataSetProviderType getSupportedProvider(); @Override Iterable<ConstraintViolation<?>> validateCustomAttributes( CSVDataSetDef dataSetDef, Object... params); @Override Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params); }
CSVDataSetDefValidator extends AbstractDataSetDefValidator<CSVDataSetDef> { @Override public Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params) { assert params != null && params.length == 1; final Boolean isFilePath = (Boolean) params[0]; Set<ConstraintViolation<CSVDataSetDef>> _violations = validator.validate(dataSetDef, getValidationGroups(isCacheEnabled, isPushEnabled, isRefreshEnabled, CSVDataSetDefValidation.class, isFilePath ? CSVDataSetDefFilePathValidation.class : CSVDataSetDefFileURLValidation.class)); return toIterable(_violations); } @Inject  CSVDataSetDefValidator( Validator validator ); @Override DataSetProviderType getSupportedProvider(); @Override Iterable<ConstraintViolation<?>> validateCustomAttributes( CSVDataSetDef dataSetDef, Object... params); @Override Iterable<ConstraintViolation<?>> validate(CSVDataSetDef dataSetDef, boolean isCacheEnabled, boolean isPushEnabled, boolean isRefreshEnabled, Object... params);  }