Ejemplo n.º 1
0
        public void DeleteTeamProject_PassInTestProjectDetailsWithNonExistingProjectName_ArgumentExceptionThrown()
        {
            // arrange
            ITeamProjects teamProjects = TeamProjectFactory.CreateTeamProjectMananger(TestConstants.TfsCollectionUri);
            string        projectName  = TestConstants.TfsTeamProjectName + Guid.NewGuid().ToString("N");

            // act
            teamProjects.DeleteTeamProject(projectName);

            // assert
        }
Ejemplo n.º 2
0
        public void ClassCleanup()
        {
            ITeamProjects teamProjects = TeamProjectFactory.CreateTeamProjectMananger(TestConstants.TfsCollectionUri);

            foreach (string projectName in teamProjects.ListTeamProjectNames())
            {
                if (projectName.StartsWith(TestProjectNameBase))
                {
                    teamProjects.DeleteTeamProject(projectName, true, false);
                }
            }
        }
Ejemplo n.º 3
0
        public void CreateAndDeleteTeamProject_PassInTestProjectDetails_ProjectListToReturnTheNewProjectInTheListAndThenTheProjectToBeRemovedAndVerifyTheWarnings()
        {
            // arrange
            ITeamProjects teamProjects = TeamProjectFactory.CreateTeamProjectMananger(TestConstants.TfsCollectionUri);
            string        projectName  = TestProjectNameBase + Guid.NewGuid().ToString("N");

            IProcessTemplates processTemplates    = ProcessTemplateFactory.CreateProcessTemplateMananger(TestConstants.TfsCollectionUri);
            string            processTemplateName = processTemplates.ListProcessTemplates()[0].Name;

            // act
            teamProjects.CreateTeamProject(projectName, projectName + " Description", processTemplateName, false, false);

            // assert
            bool actual = false;

            foreach (string project in teamProjects.ListTeamProjectNames())
            {
                if (string.Compare(project, projectName, true) == 0)
                {
                    actual = true;
                    break;
                }
            }

            Assert.IsTrue(actual, "Create Failed.");
            List <Exception> exceptions;

            teamProjects.DeleteTeamProject(projectName, out exceptions, true, false);

            bool actualAfter = false;

            foreach (string project in teamProjects.ListTeamProjectNames())
            {
                if (string.Compare(project, projectName, true) == 0)
                {
                    actualAfter = true;
                    break;
                }
            }

            Assert.IsFalse(actualAfter, "Delete Failed.");
        }