Skip to content

Commit

Permalink
Test that footer is not written when record is empty (#543)
Browse files Browse the repository at this point in the history
This commit fails and so shows that, although the record is empty,
the footer is written.
  • Loading branch information
dr0i committed Sep 27, 2024
1 parent edb3a8d commit 29a5be1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,11 @@ public void shouldNotEncodeNestedTypeLiteralAsAttribute() {
assertEquals(expected, actual);
}

@Test
public void issue543_shouldNotWriteFooterWhenRecordIsEmpty() {
encoder.closeStream();
String actual = resultCollector.toString();
assertTrue(actual.isEmpty());
}

}

0 comments on commit 29a5be1

Please sign in to comment.