@Test(expected = IllegalArgumentException.class) public void testWithEscapeCRThrowsExceptions() { CSVFormat.DEFAULT.withEscape(CR); }
@Test(expected = IllegalArgumentException.class) public void testEscapeSameAsCommentStartThrowsExceptionForWrapperType() { // Cannot assume that callers won't use different Character objects CSVFormat.DEFAULT.withEscape(new Character('!')).withCommentMarker(new Character('!')); }
@Test public void testWithEscape() throws Exception { final CSVFormat formatWithEscape = CSVFormat.DEFAULT.withEscape('&'); assertEquals(Character.valueOf('&'), formatWithEscape.getEscapeCharacter()); }
@Test(expected = IllegalArgumentException.class) public void testEscapeSameAsCommentStartThrowsException() { CSVFormat.DEFAULT.withEscape('!').withCommentMarker('!'); }