(fix) tests regarding acceptance computation

This commit is contained in:
Andreas Penski (init) 2020-03-20 14:42:03 +01:00
parent ab341feece
commit e313bc6328
2 changed files with 4 additions and 3 deletions

View file

@ -68,8 +68,9 @@ public class DefaultCheckTest {
final Result doc = this.implementation.checkInput(read(VALID_EXAMPLE)); final Result doc = this.implementation.checkInput(read(VALID_EXAMPLE));
assertThat(doc).isNotNull(); assertThat(doc).isNotNull();
assertThat(doc.getReport()).isNotNull(); assertThat(doc.getReport()).isNotNull();
// happy case has schematron errors !??
assertThat(doc.isAcceptable()).isFalse(); assertThat(doc.isAcceptable()).isFalse();
assertThat(doc.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.UNDEFINED); assertThat(doc.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.REJECT);
} }
@Test @Test

View file

@ -19,7 +19,7 @@ import de.kosit.validationtool.impl.Helper.Simple;
* *
* @author Andreas Penski * @author Andreas Penski
*/ */
public class SimpleScenarioCheck { public class SimpleScenarioCheckTest {
private DefaultCheck implementation; private DefaultCheck implementation;
@ -56,7 +56,7 @@ public class SimpleScenarioCheck {
public void testWithoutAcceptMatch() throws MalformedURLException { public void testWithoutAcceptMatch() throws MalformedURLException {
final Result result = this.implementation.checkInput(InputFactory.read(Simple.FOO.toURL())); final Result result = this.implementation.checkInput(InputFactory.read(Simple.FOO.toURL()));
assertThat(result).isNotNull(); assertThat(result).isNotNull();
assertThat(result.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.UNDEFINED); assertThat(result.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.ACCEPTABLE);
} }
} }