예제 #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('!');
 }