Skip to content

Commit

Permalink
Fix CsvProcessor unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
  • Loading branch information
dinujoh committed Sep 12, 2024
1 parent 78fd1c3 commit 5c11fb9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void test_when_messageIsEmpty_then_notParsed() {
@Test
void test_when_delimiterIsTab_then_parsedCorrectly() {
when(processorConfig.getDelimiter()).thenReturn("\t");
csvProcessor = createObjectUnderTest();

Record<Event> eventUnderTest = createMessageEvent("1\t2\t3");
final List<Record<Event>> editedEvents = (List<Record<Event>>) csvProcessor.doExecute(Collections.singletonList(eventUnderTest));
Expand Down Expand Up @@ -293,6 +294,7 @@ void test_when_twoEventsAndNoHeaderSourceOnOne_then_ChooseUserColumns() {
@Test
void test_when_differentQuoteCharacter_then_parsesCorrectly() {
when(processorConfig.getQuoteCharacter()).thenReturn("\'");
csvProcessor = createObjectUnderTest();

final Record<Event> eventUnderTest = createMessageEvent("'1','2','3'");
final List<Record<Event>> editedEvents = (List<Record<Event>>) csvProcessor.doExecute(Collections.singletonList(eventUnderTest));
Expand Down

0 comments on commit 5c11fb9

Please sign in to comment.