use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION in project drools by kiegroup.
the class ValidatorKnowledgeRequirementTest method testKNOWREQ_MISSING_BKM_ReaderInput.
@Test
public void testKNOWREQ_MISSING_BKM_ReaderInput() throws IOException {
try (final Reader reader = getReader("knowledgerequirement/KNOWREQ_MISSING_BKM.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(2));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.MISSING_EXPRESSION)));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION in project drools by kiegroup.
the class ValidatorTypeRefTest method testTYPEREF_NO_NS_ReaderInput.
@Test
public void testTYPEREF_NO_NS_ReaderInput() throws IOException {
try (final Reader reader = getReader("typeref/TYPEREF_NO_NS.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(2));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION)));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION in project drools by kiegroup.
the class ValidatorAuthorityRequirementTest method testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_ReaderInput.
@Test
public void testAUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_DEP_REQ_AUTH_NOT_KNOWLEDGESOURCE.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(3));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION in project drools by kiegroup.
the class ValidatorAuthorityRequirementTest method testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_ReaderInput.
@Test
public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_AUTH_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_AUTH.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(3));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION in project drools by kiegroup.
the class ValidatorArtifactTest method testASSOC_REFERENCES_NOT_EMPTY_ReaderInput.
@Test
public void testASSOC_REFERENCES_NOT_EMPTY_ReaderInput() throws IOException {
try (final Reader reader = getReader("artifact/ASSOC_REFERENCES_NOT_EMPTY.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(2));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND)));
}
}
Aggregations