public void FolderAddTest()
        {
            // arrange
            Random random       = new Random();
            int    randomNumber = random.Next(0, 1000);

            string folder = "TestFolder" + randomNumber;

            // act
            testFoldersToDelete.Add(
                tfsHelperFunctions.AddNewFolder(folder));

            // assert
            //_tfsHelperFunctions.QueryHierarchy.Count.ShouldBeGreaterThan(0);
        }
Example #2
0
        //////////////////////////////////////////////////////////////////////////////
        /// Button click methods
        private void NewQueryAddButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //Add folder
                tfsHelperFunctions.AddNewFolder(NewQueryFolderTextBox.Text);

                this.ShowMessageAsync("Success", "New folder " + "\"" + NewQueryFolderTextBox.Text + "\"" + " added!");
            }
            catch (Exception ex)
            {
                if (ex is NullReferenceException)
                {
                    this.ShowMessageAsync("Error",
                                          "Please connect to a TFS project before copying queries between folders");
                }
            }
        }