From 7544dfebb748d88d307060fb33a6cbc626153378 Mon Sep 17 00:00:00 2001 From: shotishu Date: Sun, 28 Apr 2024 22:40:12 -0400 Subject: [PATCH] Update ParserTest.java --- src/test/java/ParserTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/java/ParserTest.java b/src/test/java/ParserTest.java index 9109e2a..82b06a0 100644 --- a/src/test/java/ParserTest.java +++ b/src/test/java/ParserTest.java @@ -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 parse = new FixedLength() + .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 {