Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void copyToDirectoryCopiesFile() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void CopyToDirectoryCopiesFile()
        {
            File source        = new File(Path, "source");
            File target        = new File(Path, "target");
            File file          = new File(source, "file");
            File fileAfterCopy = new File(target, "file");

            Fsa.mkdirs(source);
            Fsa.mkdirs(target);
            Fsa.create(file).close();
            assertTrue(Fsa.fileExists(file));
            assertFalse(Fsa.fileExists(fileAfterCopy));
            Fsa.copyToDirectory(file, target);
            assertTrue(Fsa.fileExists(file));
            assertTrue(Fsa.fileExists(fileAfterCopy));
        }