Package org.apache.any23.extractor.yaml
Class YAMLExtractorTest
- java.lang.Object
-
- org.apache.any23.AbstractAny23TestBase
-
- org.apache.any23.extractor.html.AbstractExtractorTestCase
-
- org.apache.any23.extractor.yaml.YAMLExtractorTest
-
public class YAMLExtractorTest extends AbstractExtractorTestCase
TestYAMLExtractor.- Author:
- Jacek Grzebyta (jgrzebyta [at] apache [dot] org)
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogstatic Stringns-
Fields inherited from class org.apache.any23.extractor.html.AbstractExtractorTestCase
baseIRI, conn
-
Fields inherited from class org.apache.any23.AbstractAny23TestBase
tempDirectory, testFolder
-
-
Constructor Summary
Constructors Constructor Description YAMLExtractorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfloatsTest()protected ExtractorFactory<?>getExtractorFactory()voidintegersTest()voidmultiTest()voidnullTest()voidsimpleFileLoading()voidsimpleTest312()Test to validate simple yaml file for ANY23-312voidtree2Test()This test covers a typical situation when a document is a map.voidtreeTest()voidtreeTest2()-
Methods inherited from class org.apache.any23.extractor.html.AbstractExtractorTestCase
assertContains, assertContains, assertContains, assertContains, assertContains, assertContains, assertContainsModel, assertContainsModel, assertExtract, assertExtract, assertIssue, assertModelEmpty, assertModelNotEmpty, assertNoIssues, assertNotContains, assertNotContains, assertNotContains, assertNotContains, assertNotFound, assertStatementsSize, assertStatementsSize, assertStatementsSize, dumpAsListOfStatements, dumpHumanReadableTriples, dumpModelToNQuads, dumpModelToRDFXML, dumpModelToTurtle, extract, findExactlyOneBlankSubject, findExactlyOneObject, findObject, findObjectAsLiteral, findObjectAsResource, findObjects, findSubjects, getConnection, getIssues, getIssues, getReport, getStatements, getStatementsSize, setUp, tearDown
-
Methods inherited from class org.apache.any23.AbstractAny23TestBase
copyResourceToTempFile, getDocumentSourceFromResource, getDocumentSourceFromResource
-
-
-
-
Field Detail
-
log
public static final org.slf4j.Logger log
-
ns
public static final String ns
- See Also:
- Constant Field Values
-
-
Method Detail
-
getExtractorFactory
protected ExtractorFactory<?> getExtractorFactory()
- Specified by:
getExtractorFactoryin classAbstractExtractorTestCase- Returns:
- the factory of the extractor to be tested.
-
simpleTest312
public void simpleTest312() throws ExceptionTest to validate simple yaml file for ANY23-312- Throws:
Exception- if there is an error asserting the test data.
-
tree2Test
public void tree2Test() throws ExceptionThis test covers a typical situation when a document is a map.
NB: Following yaml standard those 2 cases are parsed to different graphs:
Case 1:--- key1: value1 key2: value2 key3: Some text value, maybe description
Case 2:--- - key1: value1 - key2: value2 - key3: Some text value, maybe description
- Throws:
Exception- if there is an error asserting the test data.- See Also:
treeTest()
-
-