Skip to content

Commit

Permalink
Adjust assignation to fit existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien LE MÉNER committed Aug 23, 2021
1 parent 3ad787d commit 868fae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Expand Up @@ -274,13 +274,13 @@ public String getLineSeparator()
*/
public void setLineSeparator( String lineSeparator )
{
if ( lineSeparator != null )
try
{
this.lineSeparator = Eol.valueOf(lineSeparator).getEolString();
}
else
catch ( IllegalArgumentException e )
{
this.lineSeparator = null;
this.lineSeparator = lineSeparator;
}
}

Expand Down
Expand Up @@ -324,14 +324,8 @@ public void testSetLineSeparator()
transformer.setLineSeparator("CRLF");
Assert.assertEquals("\r\n", transformer.getLineSeparator());

transformer.setLineSeparator(null);
Assert.assertEquals(LINE_SEPARATOR, transformer.getLineSeparator());
}

@Test(expected = IllegalArgumentException.class)
public void testSetLineSeparatorUnknownEol()
{
transformer.setLineSeparator("INEXISTANT");
transformer.setLineSeparator("RANDOM");
Assert.assertEquals("RANDOM", transformer.getLineSeparator());
}

public static void assertEquals( FileHeader model, FileHeader model2 )
Expand Down

0 comments on commit 868fae0

Please sign in to comment.