Class TextLineParserTest

java.lang.Object
test.de.iip_ecosphere.platform.connectors.TextLineParserTest

public class TextLineParserTest extends Object
Tests the TextLineParser.
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • TextLineParserTest

      public TextLineParserTest()
  • Method Details

    • testTextLineParser

      public void testTextLineParser() throws IOException
      Tests basic successful text line parsing with different charsets and separators.
      Throws:
      IOException - shall not occur
    • testTextLineParser

      private de.iip_ecosphere.platform.connectors.parser.TextLineParser.TextLineParseResult testTextLineParser(String[] parts, String charset, String separator) throws IOException
      Tests text line parsing with varying parts, charset and separator.
      Parameters:
      parts - the parts to be tested in positional mode
      charset - the charset
      separator - the separator
      Returns:
      the parse result for further tests
      Throws:
      IOException - in case that parsing fails
    • testConverterFail

      public void testConverterFail()
      Tests cases where the converter shall fail.
    • testCreateInstance

      public void testCreateInstance()
      Tests ParserUtils.createInstance(ClassLoader, String, String).
    • testTextLineParserEmptySeparator

      public void testTextLineParserEmptySeparator() throws IOException
      Tests basic successful text line parsing with empty separator.
      Throws:
      IOException - shall not occur