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

  Test `YAMLExtractor`.
  Author:
    Jacek Grzebyta (jgrzebyta [at] apache [dot] org)

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static org.slf4j.Logger` | `log` |
    `static String` | `ns` |

    - ### 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
    --- | --- | ---
    `void` | `floatsTest()` |
    `protected ExtractorFactory<?>` | `getExtractorFactory()` |
    `void` | `integersTest()` |
    `void` | `multiTest()` |
    `void` | `nullTest()` |
    `void` | `simpleFileLoading()` |
    `void` | `simpleTest312()` | Test to validate simple yaml file for ANY23-312
    `void` | `tree2Test()` | This test covers a typical situation when a document is a map.
    `void` | `treeTest()` |
    `void` | `treeTest2()` |

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### log

          public static final org.slf4j.Logger log

    - #### ns

          public static final String ns

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### YAMLExtractorTest

          public YAMLExtractorTest()

  - ### Method Detail

    - #### getExtractorFactory

          protected ExtractorFactory<?> getExtractorFactory()

      Specified by:
        `getExtractorFactory` in class `AbstractExtractorTestCase`
      Returns:
        the factory of the extractor to be tested.

    - #### simpleTest312

          public void simpleTest312()
                             throws Exception

      Test to validate simple yaml file for ANY23-312
      Throws:
        `Exception` - if there is an error asserting the test data.

    - #### simpleFileLoading

          public void simpleFileLoading()
                                 throws Exception

      Throws:
        `Exception`

    - #### integersTest

          public void integersTest()
                            throws Exception

      Throws:
        `Exception`

    - #### floatsTest

          public void floatsTest()
                          throws Exception

      Throws:
        `Exception`

    - #### multiTest

          public void multiTest()
                         throws Exception

      Throws:
        `Exception`

    - #### nullTest

          public void nullTest()
                        throws Exception

      Throws:
        `Exception`

    - #### treeTest

          public void treeTest()
                        throws Exception

      Throws:
        `Exception`

    - #### treeTest2

          public void treeTest2()
                         throws Exception

      Throws:
        `Exception`

    - #### tree2Test

          public void tree2Test()
                         throws Exception

      This 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()`