Skip to content

Commit

Permalink
feat(objectionary#2147): move PacksTest under ParsingTrainTest
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jun 15, 2023
1 parent 0d51740 commit f5685da
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 63 deletions.
63 changes: 0 additions & 63 deletions eo-parser/src/test/java/org/eolang/parser/PacksTest.java

This file was deleted.

27 changes: 27 additions & 0 deletions eo-parser/src/test/java/org/eolang/parser/ParsingTrainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import com.yegor256.xsline.Xsline;
import org.eolang.jucs.ClasspathSource;
import org.eolang.xax.XaxStory;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;

/**
* Test case for {@link ParsingTrain}.
Expand Down Expand Up @@ -74,4 +78,27 @@ void stopsPipeline() {
);
}

@ParameterizedTest
@ClasspathSource(value = "org/eolang/parser/packs/", glob = "**.yaml")
void parsesPacks(final String pack) throws Exception {
final CheckPack check = new CheckPack(pack);
if (check.skip()) {
Assumptions.abort(
String.format("%s is not ready", pack)
);
}
MatcherAssert.assertThat(
check.failures(),
Matchers.empty()
);
}

@ParameterizedTest
@ClasspathSource(value = "org/eolang/parser/xax/", glob = "**.yml")
void createsXaxStoryWithXslStylesheets(final String yaml) {
MatcherAssert.assertThat(
new XaxStory(yaml),
Matchers.is(true)
);
}
}

0 comments on commit f5685da

Please sign in to comment.