use of org.kie.dmn.api.core.DMNMessage in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_MULTIPLE_EXPRESSIONS_ReaderInput.
@Test
public void testDECISION_MULTIPLE_EXPRESSIONS_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_MULTIPLE_EXPRESSIONS.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(1));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.FAILED_XML_VALIDATION)));
}
}
use of org.kie.dmn.api.core.DMNMessage in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_DECISION_OWNER_WRONG_TYPE_ReaderInput.
@Test
public void testDECISION_DECISION_OWNER_WRONG_TYPE_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_DECISION_OWNER_WRONG_TYPE.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)));
}
}
use of org.kie.dmn.api.core.DMNMessage in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_CYCLIC_DEPENDENCY_SELF_REFERENCE_ReaderInput.
@Test
public void testDECISION_CYCLIC_DEPENDENCY_SELF_REFERENCE_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_CYCLIC_DEPENDENCY_SELF_REFERENCE.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(1));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.REQ_NOT_FOUND)));
}
}
use of org.kie.dmn.api.core.DMNMessage in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_MISSING_EXPR_ReaderInput.
@Test
public void testDECISION_MISSING_EXPR_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_MISSING_EXPR.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(1));
assertThat(validate.get(0).toString(), validate.get(0).getMessageType(), is(DMNMessageType.MISSING_EXPRESSION));
}
}
use of org.kie.dmn.api.core.DMNMessage in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_DEADLY_KITE_ReaderInput.
@Test
public void testDECISION_DEADLY_KITE_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_DEADLY_KITE.dmn")) {
final List<DMNMessage> validate = validator.validate(reader, VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(ValidatorUtil.formatMessages(validate), validate.size(), is(0));
}
}
Aggregations