001package bradleyross.library.helpers.tests;
002import bradleyross.library.helpers.FileHelpers;
003/**
004 * Test driver for bradleyross.library.helpers.FileHelpers.copyFile(String,String).
005 * @author Bradley Ross
006 * @see bradleyross.library.helpers.FileHelpers#copyFile(String,String)
007 */
008public class TestCopyFile {
009
010        /**
011         * @param args The first argument is the name of the original file, while the 
012         *        second parameter is the name of the copy to be created.
013         */
014        public static void main(String[] args) 
015        {
016                if (args.length < 2)
017                {
018                        System.out.println("Error in bradleyross.library.helpers.tests.TestCopyFile");
019                        System.out.println("Not enough arguments");
020                }
021                try
022                {
023                FileHelpers.copyFile(args[0], args[1]);
024                }
025                catch (Exception e)
026                {
027                        System.out.println(e.getClass().getName() + " " + e.getMessage());
028                }
029        }
030}