use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorAuthorityRequirementTest method testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_ReaderInput.
@Test
public void testAUTHREQ_DEP_REQ_DEC_NOT_DECISION_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_DEP_REQ_DEC_NOT_DECISION.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_SCHEMA in project drools by kiegroup.
the class ValidatorAuthorityRequirementTest method testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_ReaderInput.
@Test
public void testAUTHREQ_DEP_REQ_INPUT_NOT_INPUT_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_DEP_REQ_INPUT_NOT_INPUT.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_SCHEMA in project drools by kiegroup.
the class ValidatorAuthorityRequirementTest method testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_ReaderInput.
@Test
public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_DEC_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_DEC.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_SCHEMA in project drools by kiegroup.
the class ValidatorBusinessKnowledgeModelTest method testBKM_MISSING_VAR_ReaderInput.
@Test
public void testBKM_MISSING_VAR_ReaderInput() throws IOException {
try (final Reader reader = getReader("businessknowledgemodel/BKM_MISSING_VAR.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 ValidatorBusinessKnowledgeModelTest method testBKM_MISMATCH_VAR_ReaderInput.
@Test
public void testBKM_MISMATCH_VAR_ReaderInput() throws IOException {
try (final Reader reader = getReader("businessknowledgemodel/BKM_MISMATCH_VAR.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.VARIABLE_NAME_MISMATCH)));
}
}
Aggregations