use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorKnowledgeSourceTest method testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_ReaderInput.
@Test
public void testKNOW_SOURCE_OWNER_NOT_ORG_UNIT_ReaderInput() throws IOException {
try (final Reader reader = getReader("knowledgesource/KNOW_SOURCE_OWNER_NOT_ORG_UNIT.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 ValidatorKnowledgeSourceTest method testKNOW_SOURCE_MISSING_OWNER_ReaderInput.
@Test
public void testKNOW_SOURCE_MISSING_OWNER_ReaderInput() throws IOException {
try (final Reader reader = getReader("knowledgesource/KNOW_SOURCE_MISSING_OWNER.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.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorTypeRefTest method testTYPEREF_NOT_FEEL_NOT_DEF_ReaderInput.
@Test
public void testTYPEREF_NOT_FEEL_NOT_DEF_ReaderInput() throws IOException {
try (final Reader reader = getReader("typeref/TYPEREF_NOT_FEEL_NOT_DEF.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.INVALID_NAME)));
assertTrue(validate.stream().anyMatch(p -> p.getMessageType().equals(DMNMessageType.TYPE_DEF_NOT_FOUND)));
}
}
use of org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA in project drools by kiegroup.
the class ValidatorTypeRefTest method testTYPEREF_NO_FEEL_TYPE_ReaderInput.
@Test
public void testTYPEREF_NO_FEEL_TYPE_ReaderInput() throws IOException {
try (final Reader reader = getReader("typeref/TYPEREF_NO_FEEL_TYPE.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.TYPE_REF_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_INPUT_ReaderInput.
@Test
public void testAUTH_REQ_MISSING_DEPENDENCY_REQ_INPUT_ReaderInput() throws IOException {
try (final Reader reader = getReader("authorityrequirement/AUTHREQ_MISSING_DEPENDENCY_REQ_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)));
}
}
Aggregations