public void getFileRevisionTest()
 {
     SvnChangeSetMaker target = new SvnChangeSetMaker();
     string            fileWorkingCopyPath = string.Empty;
     string            filePathToWrite     = string.Empty;
     string            localPath           = "";
     List <string>     files = target.getModifiedFiles(localPath);
 }
Exemplo n.º 2
0
        private void buttonCheckModifications_Click(object sender, EventArgs e)
        {
            listView1.Items.Clear();
            SvnChangeSetMaker helper    = new SvnChangeSetMaker();
            string            localPath = @"";

            helper.getModifiedFilesAsync(localPath, cb_progress, cb_Completed);
        }
Exemplo n.º 3
0
        private void buttonZip_Click(object sender, EventArgs e)
        {
            SvnChangeSetMaker helper    = new SvnChangeSetMaker();
            string            localPath = string.Empty;
            List <string>     files     = helper.getModifiedFiles(localPath);

            helper.createChangeList(files, localPath, @"C:\temp\cs");
            SvnChangeSetHelper.zipChangeSetDir(@"C:\temp\cs", @"C:\temp\cs\ChangeSet.zip");
        }
        public void getModifiedFilePathsTest()
        {
            SvnChangeSetMaker target    = new SvnChangeSetMaker(); // TODO: Initialize to an appropriate value
            string            localPath = "";
            List <string>     expected  = null;
            List <string>     actual;

            actual = target.getModifiedFiles(localPath);
            Assert.AreNotEqual(expected, actual);
        }
        public void getModifiedListAsyncTest()
        {
            SvnChangeSetMaker target    = new SvnChangeSetMaker(); // TODO: Initialize to an appropriate value
            string            localPath = "";
            EventHandler <ProgressEventArgs>  progressCallback  = cb_Progress;
            EventHandler <CompletedEventArgs> completedCallback = cb_completed;
            bool expected = true;
            bool actual;

            actual = target.getModifiedFilesAsync(localPath, progressCallback, completedCallback);
            Assert.AreEqual(expected, actual);
        }
        public void createChangeListTest()
        {
            SvnChangeSetMaker target    = new SvnChangeSetMaker(); // TODO: Initialize to an appropriate value
            string            localPath = "";
            List <string>     modifiedFileList;

            modifiedFileList = target.getModifiedFiles(localPath);

            string dirPath          = @"C:\temp\cstest";
            string localArchivePath = localPath;
            bool   expected         = true;
            bool   actual;

            actual = target.createChangeList(modifiedFileList, localArchivePath, dirPath);
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 7
0
        private void buttonAddRepo_Click(object sender, RoutedEventArgs e)
        {
            if (!SvnChangeSetMaker.IsWorkingCopy(textBoxRepoPath.Text))
            {
                MessageBox.Show("The given directory is not a SVN repository...", "Invalid Repository", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (!repositoryInfo.Any((repo) => repo.Path.ToLower() == textBoxRepoPath.Text.ToLower()))
            {
                string path = textBoxRepoPath.Text;
                path = path.TrimEnd('\\');
                string   name      = Path.GetDirectoryName(textBoxRepoPath.Text);
                string[] pathSplit = path.Split('\\');


                if (pathSplit.Count() > 2)
                {
                    int count = pathSplit.Count();
                    name = pathSplit[count - 2] +
                           @"\" + pathSplit[count - 1];
                }

                repositoryInfo.Add(new RepoInfo()
                {
                    Path         = path,
                    Name         = name,
                    Description  = "Sample Description",
                    ShowProgress = Visibility.Hidden
                });
                listViewRepos.Items.Refresh();
                textBoxRepoPath.Text = string.Empty;
            }
            else
            {
                MessageBox.Show("Selected repository already exists");
            }
        }
        public void getModifiedListAsyncTest()
        {
            SvnChangeSetMaker target = new SvnChangeSetMaker(); // TODO: Initialize to an appropriate value
            string localPath = "";
            EventHandler<ProgressEventArgs> progressCallback = cb_Progress;
            EventHandler<CompletedEventArgs> completedCallback = cb_completed;
            bool expected = true;
            bool actual;

            actual = target.getModifiedFilesAsync(localPath, progressCallback, completedCallback);
            Assert.AreEqual(expected, actual);
        }