mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
Bug fix for building scenario with schematron.
This commit is contained in:
parent
5184f86c5e
commit
71a705c39d
4 changed files with 25 additions and 2 deletions
|
|
@ -140,6 +140,25 @@ public class ScenarioBuilderTest {
|
|||
assertThat(configuration.getNamespace()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConfigureWithSchematron() {
|
||||
final ContentRepository repository = Simple.createContentRepository();
|
||||
final XPathExecutable match = repository.createXPath("//*", null);
|
||||
final XPathExecutable accept = repository.createXPath("//*", null);
|
||||
final ScenarioBuilder builder = createScenario();
|
||||
builder.getNamespaces().clear();
|
||||
|
||||
builder.match(match);
|
||||
builder.acceptWith(accept);
|
||||
final Result<Scenario, String> result = builder.build(repository);
|
||||
assertThat(result.isValid()).isTrue();
|
||||
final ScenarioType configuration = result.getObject().getConfiguration();
|
||||
assertThat(configuration.getMatch()).isNotEmpty();
|
||||
assertThat(configuration.getAcceptMatch()).isNotEmpty();
|
||||
assertThat(configuration.getNamespace()).isEmpty();
|
||||
assertThat(configuration.getValidateWithSchematron()).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasicAttributes() {
|
||||
final ContentRepository repository = Simple.createContentRepository();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue