Skip to content

Commit

Permalink
Update ParserTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
shotishu authored Apr 29, 2024
1 parent 85fc820 commit 7544dfe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/java/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ class ParserTest {
"CatSnowball 20200103@" +
"EmplJoe3 Smith Developer ";

@Test
@DisplayName("Parse as input stream with default charset and one line type")
void testParseInheritedOneLineType() throws FixedLengthException {
List<Row> parse = new FixedLength<Row>()
.registerLineType(InheritedEmployee.class)
.parse(new ByteArrayInputStream(singleTypeExample.getBytes()));

assertEquals(2, parse.size());
parse.forEach( e ->{
assertNotNull(((InheritedEmployee)e).firstName);
assertNotNull(((InheritedEmployee)e).lastName);
});
}


@Test
@DisplayName("Parse as input stream with default charset and one line type")
void testParseOneLineType() throws FixedLengthException {
Expand Down

0 comments on commit 7544dfe

Please sign in to comment.