mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
(chore) Integration Testing acceptMatch functionality
This commit is contained in:
parent
65ed945602
commit
245d7d4cac
6 changed files with 30 additions and 6 deletions
|
|
@ -22,10 +22,10 @@ package de.kosit.validationtool.impl;
|
|||
import static de.kosit.validationtool.api.InputFactory.read;
|
||||
import static de.kosit.validationtool.impl.Helper.Simple.GARBAGE;
|
||||
import static de.kosit.validationtool.impl.Helper.Simple.NOT_WELLFORMED;
|
||||
import static de.kosit.validationtool.impl.Helper.Simple.REJECTED;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
|
@ -54,7 +54,7 @@ public class DefaultCheckTest {
|
|||
private DefaultCheck implementation;
|
||||
|
||||
@Before
|
||||
public void setup() throws URISyntaxException {
|
||||
public void setup() {
|
||||
final CheckConfiguration d = new CheckConfiguration(Simple.SCENARIOS);
|
||||
d.setScenarioRepository(new File(Simple.REPOSITORY).toURI());
|
||||
this.implementation = new DefaultCheck(d);
|
||||
|
|
@ -130,7 +130,19 @@ public class DefaultCheckTest {
|
|||
assertThat(result.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.REJECT);
|
||||
assertThat(result.getReport()).isNotNull();
|
||||
assertThat(result.getReportDocument()).isNotNull();
|
||||
System.out.println(Helper.serialize(result.getReportDocument()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRejectAcceptMatch() {
|
||||
final Result result = this.implementation.checkInput(read(REJECTED));
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.isWellformed()).isTrue();
|
||||
assertThat(result.isSchemaValid()).isTrue();
|
||||
assertThat(result.isProcessingSuccessful()).isTrue();
|
||||
assertThat(result.getAcceptRecommendation()).isEqualTo(AcceptRecommendation.REJECT);
|
||||
assertThat(result.isAcceptable()).isFalse();
|
||||
assertThat(result.getReport()).isNotNull();
|
||||
assertThat(result.getReportDocument()).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue