Exemplo n.º 1
0
 @Test(expected = IllegalArgumentException.class)
 public void testWithEscapeCRThrowsExceptions() {
   CSVFormat.DEFAULT.withEscape(CR);
 }
Exemplo n.º 2
0
 @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('!'));
 }
Exemplo n.º 3
0
 @Test
 public void testWithEscape() throws Exception {
   final CSVFormat formatWithEscape = CSVFormat.DEFAULT.withEscape('&');
   assertEquals(Character.valueOf('&'), formatWithEscape.getEscapeCharacter());
 }
Exemplo n.º 4
0
 @Test(expected = IllegalArgumentException.class)
 public void testEscapeSameAsCommentStartThrowsException() {
   CSVFormat.DEFAULT.withEscape('!').withCommentMarker('!');
 }