use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_MISSING_VARbis_ReaderInput.
@Test
public void testDECISION_MISSING_VARbis_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_MISSING_VARbis.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.MISSING_VARIABLE)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorDecisionTest method testDECISION_PERF_INDICATOR_WRONG_TYPE_ReaderInput.
@Test
public void testDECISION_PERF_INDICATOR_WRONG_TYPE_ReaderInput() throws IOException {
try (final Reader reader = getReader("decision/DECISION_PERF_INDICATOR_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.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorInformationRequirementTest method testINFOREQ_MISSING_DECISION_ReaderInput.
@Test
public void testINFOREQ_MISSING_DECISION_ReaderInput() throws IOException {
try (final Reader reader = getReader("informationrequirement/INFOREQ_MISSING_DECISION.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_SCHEMA in project drools by kiegroup.
the class ValidatorInformationRequirementTest method testINFOREQ_MISSING_INPUT_ReaderInput.
@Test
public void testINFOREQ_MISSING_INPUT_ReaderInput() throws IOException {
try (final Reader reader = getReader("informationrequirement/INFOREQ_MISSING_INPUT.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_SCHEMA in project drools by kiegroup.
the class ValidatorKnowledgeRequirementTest method testKNOWREQ_REQ_DECISION_NOT_BKM_ReaderInput.
@Test
public void testKNOWREQ_REQ_DECISION_NOT_BKM_ReaderInput() throws IOException {
try (final Reader reader = getReader("knowledgerequirement/KNOWREQ_REQ_DECISION_NOT_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)));
}
}
Aggregations