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