Class TextLineParserTest
java.lang.Object
test.de.iip_ecosphere.platform.connectors.TextLineParserTest
Tests the
TextLineParser.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA test parser without encoding.static classA test parser with encoding. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTests cases where the converter shall fail.voidTestsParserUtils.createInstance(ClassLoader, String, String).voidTests basic successful text line parsing with different charsets and separators.private de.iip_ecosphere.platform.connectors.parser.TextLineParser.TextLineParseResulttestTextLineParser(String[] parts, String charset, String separator) Tests text line parsing with varying parts, charset and separator.voidTests basic successful text line parsing with empty separator.
-
Constructor Details
-
TextLineParserTest
public TextLineParserTest()
-
-
Method Details
-
testTextLineParser
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 modecharset- the charsetseparator- 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()TestsParserUtils.createInstance(ClassLoader, String, String). -
testTextLineParserEmptySeparator
Tests basic successful text line parsing with empty separator.- Throws:
IOException- shall not occur
-