Exemple #1
0
 @Test
 public void testCopyFile_File_File() throws Exception {
   System.out.println("copyFile");
   File in = new File(testDir + "20100618/test1.txt");
   File out = new File(testDir + "20100618/test2.txt");
   IOUtils.copyFile(in, out);
   String a = IOUtils.readFile(out.getCanonicalPath());
   String b = IOUtils.readFile(in.getCanonicalPath());
   assertEquals(a, b);
 }
Exemple #2
0
 @Test
 public void testCopyFile_String_String() throws Exception {
   System.out.println("copyFile");
   String in = testDir + "20100618/test1.txt";
   String out = testDir + "20100618/test2.txt";
   IOUtils.copyFile(in, out);
   String a = IOUtils.readFile(out);
   String b = IOUtils.readFile(in);
   assertEquals(a, b);
 }