@Test public void testWorks() throws Exception { final Path path = resourcePath("/GuvnorM2RepoDependencyExample1/src/main/resources/rule2.drl"); final URL urlToValidate = this.getClass().getResource("/GuvnorM2RepoDependencyExample1/src/main/resources/rule2.drl"); final List<ValidationMessage> errors = validator.validate(path, Resources.toString(urlToValidate, Charset.forName("UTF-8"))); assertTrue(errors.isEmpty()); }
public List<ValidationMessage> validate(final Path path, final String content) { return validatorBuildService.validate(path, content) .stream() .filter(fromValidatedPath(path)) .collect(Collectors.toList()); }
DefaultGenericKieValidator implements GenericValidator { public List<ValidationMessage> validate(final Path path, final String content) { return validatorBuildService.validate(path, content) .stream() .filter(fromValidatedPath(path)) .collect(Collectors.toList()); } }
DefaultGenericKieValidator implements GenericValidator { public List<ValidationMessage> validate(final Path path, final String content) { return validatorBuildService.validate(path, content) .stream() .filter(fromValidatedPath(path)) .collect(Collectors.toList()); } DefaultGenericKieValidator(); @Inject  DefaultGenericKieValidator(final ValidatorBuildService validatorBuildService); }
DefaultGenericKieValidator implements GenericValidator { public List<ValidationMessage> validate(final Path path, final String content) { return validatorBuildService.validate(path, content) .stream() .filter(fromValidatedPath(path)) .collect(Collectors.toList()); } DefaultGenericKieValidator(); @Inject  DefaultGenericKieValidator(final ValidatorBuildService validatorBuildService); List<ValidationMessage> validate(final Path path,
                                            final String content); List<ValidationMessage> validate(final Path path); }
DefaultGenericKieValidator implements GenericValidator { public List<ValidationMessage> validate(final Path path, final String content) { return validatorBuildService.validate(path, content) .stream() .filter(fromValidatedPath(path)) .collect(Collectors.toList()); } DefaultGenericKieValidator(); @Inject  DefaultGenericKieValidator(final ValidatorBuildService validatorBuildService); List<ValidationMessage> validate(final Path path,
                                            final String content); List<ValidationMessage> validate(final Path path);  }