@@ -215,7 +215,7 @@ public void testInputStreamToString() throws Exception {
215215 }
216216 }
217217
218- public void testReaderToString () throws Exception {
218+ public void testToString_Reader () throws Exception {
219219 FileReader fin = new FileReader (m_testFile );
220220 try {
221221 String out = IOUtils .toString (fin );
@@ -292,7 +292,7 @@ public void testToByteArray_Reader() throws IOException {
292292 Assert .assertArrayEquals (expecteds , actuals );
293293 }
294294
295- public void testInputStreamToByteArray () throws Exception {
295+ public void testToByteArray_InputStream () throws Exception {
296296 FileInputStream fin = new FileInputStream (m_testFile );
297297 try {
298298 byte [] out = IOUtils .toByteArray (fin );
@@ -305,7 +305,7 @@ public void testInputStreamToByteArray() throws Exception {
305305 }
306306 }
307307
308- public void testInputStreamToByteArray_Size () throws Exception {
308+ public void testToByteArray_InputStream_Size () throws Exception {
309309 FileInputStream fin = new FileInputStream (m_testFile );
310310 try {
311311 byte [] out = IOUtils .toByteArray (fin , m_testFile .length ());
@@ -318,7 +318,7 @@ public void testInputStreamToByteArray_Size() throws Exception {
318318 }
319319 }
320320
321- public void testInputStreamToByteArray_NegativeSize () throws Exception {
321+ public void testToByteArray_InputStream_NegativeSize () throws Exception {
322322 FileInputStream fin = new FileInputStream (m_testFile );
323323
324324 try {
@@ -333,7 +333,7 @@ public void testInputStreamToByteArray_NegativeSize() throws Exception {
333333
334334 }
335335
336- public void testInputStreamToByteArray_ZeroSize () throws Exception {
336+ public void testToByteArray_InputStream_SizeZero () throws Exception {
337337 FileInputStream fin = new FileInputStream (m_testFile );
338338
339339 try {
@@ -345,7 +345,7 @@ public void testInputStreamToByteArray_ZeroSize() throws Exception {
345345 }
346346 }
347347
348- public void testInputStreamToByteArray_IllegalSize () throws Exception {
348+ public void testToByteArray_InputStream_SizeIllegal () throws Exception {
349349 FileInputStream fin = new FileInputStream (m_testFile );
350350
351351 try {
@@ -360,7 +360,7 @@ public void testInputStreamToByteArray_IllegalSize() throws Exception {
360360
361361 }
362362
363- public void testInputStreamToByteArray_LongSize () throws Exception {
363+ public void testToByteArray_InputStream_SizeLong () throws Exception {
364364 FileInputStream fin = new FileInputStream (m_testFile );
365365
366366 try {
@@ -375,7 +375,7 @@ public void testInputStreamToByteArray_LongSize() throws Exception {
375375
376376 }
377377
378- public void testInputStreamToBufferedInputStream () throws Exception {
378+ public void testToBufferedInputStream_InputStream () throws Exception {
379379 FileInputStream fin = new FileInputStream (m_testFile );
380380 try {
381381 InputStream in = IOUtils .toBufferedInputStream (fin );
@@ -391,7 +391,7 @@ public void testInputStreamToBufferedInputStream() throws Exception {
391391
392392 @ SuppressWarnings ("deprecation" )
393393 // testing deprecated method
394- public void testStringToByteArray () throws Exception {
394+ public void testToByteArray_String () throws Exception {
395395 FileReader fin = new FileReader (m_testFile );
396396 try {
397397 // Create our String. Rely on testReaderToString() to make sure this is valid.
@@ -443,19 +443,19 @@ public void testByteArrayToString() throws Exception {
443443 }
444444 }
445445
446- public void testToByteArrayFromURI () throws Exception {
446+ public void testToByteArray_URI () throws Exception {
447447 URI url = m_testFile .toURI ();
448448 byte [] actual = IOUtils .toByteArray (url );
449449 Assert .assertEquals (FILE_SIZE , actual .length );
450450 }
451451
452- public void testToByteArrayFromURL () throws Exception {
452+ public void testToByteArray_URL () throws Exception {
453453 URL url = m_testFile .toURI ().toURL ();
454454 byte [] actual = IOUtils .toByteArray (url );
455455 Assert .assertEquals (FILE_SIZE , actual .length );
456456 }
457457
458- public void testToByteArrayFromURLConnection () throws Exception {
458+ public void testToByteArray_URLConnection () throws Exception {
459459 URLConnection urlConn = m_testFile .toURI ().toURL ().openConnection ();
460460 byte [] actual ;
461461 try {
@@ -474,7 +474,7 @@ public void testToByteArrayFromURLConnection() throws Exception {
474474 * @throws Exception
475475 * on error
476476 */
477- public void testCharSequenceToInputStream () throws Exception {
477+ public void testToInputStream_CharSequence () throws Exception {
478478 CharSequence csq = new StringBuilder ("Abc123Xyz!" );
479479 InputStream inStream = IOUtils .toInputStream (csq );
480480 byte [] bytes = IOUtils .toByteArray (inStream );
@@ -495,7 +495,7 @@ public void testCharSequenceToInputStream() throws Exception {
495495 * @throws Exception
496496 * on error
497497 */
498- public void testStringToInputStream () throws Exception {
498+ public void testToInputStream_String () throws Exception {
499499 String str = "Abc123Xyz!" ;
500500 InputStream inStream = IOUtils .toInputStream (str );
501501 byte [] bytes = IOUtils .toByteArray (inStream );
@@ -535,7 +535,7 @@ public void testByteArrayToOutputStream() throws Exception {
535535 deleteFile (destination );
536536 }
537537
538- public void testInputStreamToCharArray () throws Exception {
538+ public void testToCharArray_InputStream () throws Exception {
539539 FileInputStream fin = new FileInputStream (m_testFile );
540540 try {
541541 char [] out = IOUtils .toCharArray (fin );
@@ -548,7 +548,7 @@ public void testInputStreamToCharArray() throws Exception {
548548 }
549549 }
550550
551- public void testInputStreamToCharArrayWithEncoding () throws Exception {
551+ public void testToCharArray_InputStream_CharsetName () throws Exception {
552552 FileInputStream fin = new FileInputStream (m_testFile );
553553 try {
554554 char [] out = IOUtils .toCharArray (fin , "UTF-8" );
@@ -627,7 +627,7 @@ public void testReadLines_Reader() throws Exception {
627627 }
628628 }
629629
630- public void testSkipStream () throws Exception {
630+ public void testSkipFully_InputStream () throws Exception {
631631 final int size = 1027 ;
632632
633633 InputStream input = new ByteArrayInputStream (new byte [size ]);
@@ -649,7 +649,7 @@ public void testSkipStream() throws Exception {
649649
650650 }
651651
652- public void testSkipReader () throws Exception {
652+ public void testSkipFully_Reader () throws Exception {
653653 final int size = 1027 ;
654654
655655 Reader input = new CharArrayReader (new char [size ]);
@@ -670,7 +670,7 @@ public void testSkipReader() throws Exception {
670670 IOUtils .closeQuietly (input );
671671 }
672672
673- public void testSkipFileReader () throws Exception {
673+ public void testSkip_FileReader () throws Exception {
674674 FileReader in = new FileReader (m_testFile );
675675 try {
676676 assertEquals (FILE_SIZE - 10 , IOUtils .skip (in , FILE_SIZE - 10 ));
@@ -681,7 +681,7 @@ public void testSkipFileReader() throws Exception {
681681 }
682682 }
683683
684- public void testSkipFileInput () throws Exception {
684+ public void testSkip_InputStream () throws Exception {
685685 InputStream in = new FileInputStream (m_testFile );
686686 try {
687687 assertEquals (FILE_SIZE - 10 , IOUtils .skip (in , FILE_SIZE - 10 ));
@@ -692,48 +692,48 @@ public void testSkipFileInput() throws Exception {
692692 }
693693 }
694694
695- private void testURIToString (String encoding ) throws Exception {
696- URI url = m_testFile .toURI ();
697- String out = IOUtils .toString (url , encoding );
695+ private void testToString_URI (String encoding ) throws Exception {
696+ URI uri = m_testFile .toURI ();
697+ String out = IOUtils .toString (uri , encoding );
698698 assertNotNull (out );
699699 assertEquals ("Wrong output size" , FILE_SIZE , out .length ());
700700 }
701701
702- public void testURIToStringNoEncoding () throws Exception {
702+ public void testToString_URI () throws Exception {
703703 URI url = m_testFile .toURI ();
704704 String out = IOUtils .toString (url );
705705 assertNotNull (out );
706706 assertEquals ("Wrong output size" , FILE_SIZE , out .length ());
707707 }
708708
709- public void testURIToStringNullEncoding () throws Exception {
710- testURIToString (null );
709+ public void testToString_URI_CharsetNameNull () throws Exception {
710+ testToString_URI (null );
711711 }
712712
713- public void testURIToStringUsAciiEncoding () throws Exception {
714- testURIToString ("US-ASCII" );
713+ public void testToString_URI_CharsetName () throws Exception {
714+ testToString_URI ("US-ASCII" );
715715 }
716716
717- private void testURLToString (String encoding ) throws Exception {
717+ private void testToString_URL (String encoding ) throws Exception {
718718 URL url = m_testFile .toURI ().toURL ();
719719 String out = IOUtils .toString (url , encoding );
720720 assertNotNull (out );
721721 assertEquals ("Wrong output size" , FILE_SIZE , out .length ());
722722 }
723723
724- public void testURLToStringNoEncoding () throws Exception {
724+ public void testToString_URL () throws Exception {
725725 URL url = m_testFile .toURI ().toURL ();
726726 String out = IOUtils .toString (url );
727727 assertNotNull (out );
728728 assertEquals ("Wrong output size" , FILE_SIZE , out .length ());
729729 }
730730
731- public void testURLToStringNullEncoding () throws Exception {
732- testURLToString (null );
731+ public void testToString_URL_CharsetNameNull () throws Exception {
732+ testToString_URL (null );
733733 }
734734
735- public void testURLToStringUsAciiEncoding () throws Exception {
736- testURLToString ("US-ASCII" );
735+ public void testToString_URL_CharsetName () throws Exception {
736+ testToString_URL ("US-ASCII" );
737737 }
738738
739739 public void testContentEqualsIgnoreEOL () throws Exception {
@@ -841,7 +841,7 @@ public void testReadFully_ReadableByteChannel() throws Exception {
841841 }
842842 }
843843
844- public void testReadReader () throws Exception {
844+ public void testReadFully_Reader () throws Exception {
845845 final int size = 1027 ;
846846
847847 char [] buffer = new char [size ];
@@ -864,15 +864,15 @@ public void testReadReader() throws Exception {
864864 IOUtils .closeQuietly (input );
865865 }
866866
867- public void testReadReaderWithOffset () throws Exception {
867+ public void testReadFully_Reader_Offset () throws Exception {
868868 Reader reader = new StringReader ("abcd1234" );
869869 char [] buffer = "wx00000000" .toCharArray ();
870870 IOUtils .readFully (reader , buffer , 2 , 8 );
871871 assertEquals ("wxabcd1234" , new String (buffer ));
872872 IOUtils .closeQuietly (reader );
873873 }
874874
875- public void testReadStreamWithOffset () throws Exception {
875+ public void testReadFully_InputStream_Offset () throws Exception {
876876 byte [] bytes = "abcd1234" .getBytes ("UTF-8" );
877877 ByteArrayInputStream stream = new ByteArrayInputStream (bytes );
878878 byte [] buffer = "wx00000000" .getBytes ("UTF-8" );
0 commit comments