コード例 #1
0
        public void FileExistsWithoutOverwriteErrors()
        {
            var existingZip       = TestFolders.CreateTempFile("zip");
            var compressionFolder = CreateValidCompressionFolder();
            var results           = RunExe(existingZip, compressionFolder);

            Assert.NotEqual(0, results.ExitCode);
            Assert.Contains("Output file '" + existingZip + "' already exists.", results.StandardError);
        }
コード例 #2
0
        public void FileExistsWithOverwriteErrors()
        {
            var existingZip       = TestFolders.CreateTempFile("zip");
            var compressionFolder = CreateValidCompressionFolder();
            var results           = RunExe(existingZip, compressionFolder, "--overwrite");

            Assert.Equal(0, results.ExitCode);
            Assert.Contains("Overwritting file '" + existingZip + "' with new compression data.", results.StandardOutput);
            Assert.True(File.Exists(existingZip));
        }
コード例 #3
0
        private static string CreateTempZipFile()
        {
            var testfilePath = TestFolders.CreateTempFile("zip");

            return("\"" + testfilePath + "\"");
        }