Пример #1
0
        public void TestCopyFile()
        {
            string remoteFilePathFrom = "/uprof/testcopyfile1.temp";
            string remoteFilePathTo   = "/uprof/testcopyfile2.temp";

            string contents = "My XML text";

            xmlmcService.PutText(remoteFilePathFrom, contents);
            Assert.IsTrue(xmlmcService.DoesFileExists(remoteFilePathFrom));

            xmlmcService.CopyFile(remoteFilePathFrom, remoteFilePathTo);

            Assert.IsTrue(xmlmcService.DoesFileExists(remoteFilePathTo));
            Assert.IsTrue(xmlmcService.DoesFileExists(remoteFilePathFrom));

            xmlmcService.RemoveFile(remoteFilePathTo);
            xmlmcService.RemoveFile(remoteFilePathFrom);
            Assert.IsFalse(xmlmcService.DoesFileExists(remoteFilePathFrom));
            Assert.IsFalse(xmlmcService.DoesFileExists(remoteFilePathTo));
        }