Ejemplo n.º 1
0
        public void FtpExecute()
        {
            ZipTest zip = new ZipTest();

            zip.ZipExecute();

            FtpUpload task = new FtpUpload();

            task.BuildEngine = new MockBuild();
            string testDir = TaskUtility.TestDirectory;

            task.LocalFile = Path.Combine(testDir, ZipTest.ZIP_FILE_NAME);
            task.RemoteUri = "ftp://localhost/MSBuild.Community.Tasks.zip";
            Assert.IsTrue(task.Execute(), "Execute Failed");
        }
Ejemplo n.º 2
0
        public void UnzipExecute()
        {
            string testDir = TaskUtility.TestDirectory;
            string zipFileName = Path.Combine(testDir, ZipTest.ZIP_FILE_NAME);

            if (!File.Exists(zipFileName))
            {
                Assert.Ignore("Zip file \"{0}\" not found; first run test that creates it", zipFileName);
            }

            ZipTest zip = new ZipTest();
            zip.ZipExecute();

            Unzip task = new Unzip();
            task.BuildEngine = new MockBuild();
            task.ZipFileName = zipFileName;
            task.TargetDirectory = Path.Combine(testDir, @"Backup");

            Assert.IsTrue(task.Execute(), "Execute Failed");
        }
Ejemplo n.º 3
0
        public void UnzipExecute()
        {
            string testDir     = TaskUtility.TestDirectory;
            string zipFileName = Path.Combine(testDir, ZipTest.ZIP_FILE_NAME);

            if (!File.Exists(zipFileName))
            {
                Assert.Ignore("Zip file \"{0}\" not found; first run test that creates it", zipFileName);
            }

            ZipTest zip = new ZipTest();

            zip.ZipExecute();

            Unzip task = new Unzip();

            task.BuildEngine     = new MockBuild();
            task.ZipFileName     = zipFileName;
            task.TargetDirectory = Path.Combine(testDir, @"Backup");

            Assert.IsTrue(task.Execute(), "Execute Failed");
        }