예제 #1
0
            static void Main(string[] args)
            {
                Console.Write("\n\n Mock Repo and its functionality");
                RepoMock repo = new RepoMock();
                repo.getFiles("*.*");
                foreach (string file in repo.files)
                    Console.Write("\n  \"{0}\"", file);

                string fileSpec = repo.files[1];
                string fileName = Path.GetFileName(fileSpec);
                Console.Write("\n  sending \"{0}\" to \"{1}\"", fileName, repo.receivePath);
                repo.sendFile(repo.files[1]);

                Console.Write("\n\n");
            }
예제 #2
0
        //<------------------Driver Logic-------------------------------->
        static void Main(string[] args)
        {
            Console.Write("\n  Demonstration of Mock Repo");
            Console.Write("\n ============================");
            RepoMock repo = new RepoMock();

            repo.getFiles("*.*");
            foreach (string file in repo.files)
            {
                Console.Write("\n  \"{0}\"", file);
            }
            Console.Write("before printing the files\n");
            string fileSpec = repo.files[1];
            string fileName = Path.GetFileName(fileSpec);

            Console.Write("\n  sending \"{0}\" to \"{1}\"", fileName, repo.receivePath);
            repo.sendFile(repo.files[1]);
            Console.Write("\n\n");
        }
예제 #3
0
        static void Main(string[] args)
        {
            Console.Write("\n  Demonstration of Mock Repo");
            Console.Write("\n ============================");

            RepoMock repo = new RepoMock();

            repo.getFiles("*.*");
            //Console.Write("file length", repo.getFiles().count());
            foreach (string file in repo.files)
            {
                Console.Write("\n  \"{0}\"", file);
            }
            //for ( int i = 0; i <= repo.getFiles.count(); i = i + 1)
            //{
            string fileSpec = repo.files[0];
            string fileName = Path.GetFileName(fileSpec);

            Console.Write("\n  sending \"{0}\" to \"{1}\"", fileName, repo.receivePath);
            repo.sendFile(repo.files[0]);
            //}
            Console.Write("\n\n");
        }