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 }
public void ClassCleanup() { ITeamProjects teamProjects = TeamProjectFactory.CreateTeamProjectMananger(TestConstants.TfsCollectionUri); foreach (string projectName in teamProjects.ListTeamProjectNames()) { if (projectName.StartsWith(TestProjectNameBase)) { teamProjects.DeleteTeamProject(projectName, true, false); } } }
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."); }