public void DuplicateServersAreIgnoredWhenAddingToTheServerList() { CCTrayProject[] projects = { new CCTrayProject("tcp://localhost:123/blah", "proj1"), new CCTrayProject("tcp://localhost:123/blah", "proj2"), }; AddProjects addProjects = new AddProjects(null, null, projects); }
public void TheServerListBoxIsPopulatedWithAListOfAllServersCurrentlyConfigured() { CCTrayProject[] projects = { new CCTrayProject("tcp://localhost:123/blah", "proj1"), new CCTrayProject("tcp://otherserver:456/blah", "proj2"), }; AddProjects addProjects = new AddProjects(null, null, projects); }
public void TheServerListBoxIsPopulatedInAlphabeticalOrder() { CCTrayProject[] projects = { new CCTrayProject("tcp://b:123/blah", "proj1"), new CCTrayProject("tcp://a:123/blah", "proj2"), }; AddProjects addProjects = new AddProjects(null, null, projects); }
private void btnAdd_Click(object sender, EventArgs e) { AddProjects addProjectDialog = new AddProjects(BuildProjectListFromListView()); Project[] projects = addProjectDialog.GetListOfNewProjects(this); if (projects != null) { foreach (Project newProject in projects) { lvProjects.Items.Add(new ProjectConfigurationListViewItemAdaptor(newProject).Item); } } }
private void btnAdd_Click(object sender, EventArgs e) { AddProjects addProjectDialog = new AddProjects( configuration.CruiseProjectManagerFactory, configuration.CruiseServerManagerFactory, BuildProjectListFromListView()); CCTrayProject[] projects = addProjectDialog.GetListOfNewProjects(this); if (projects != null) { foreach (CCTrayProject newProject in projects) { lvProjects.Items.Add(new ProjectConfigurationListViewItemAdaptor(newProject).Item); } } }
public void CurrentlyAddedProjectsAreIgnoredWhenServerIsSelected() { CCTrayProject[] allProjects = { new CCTrayProject("tcp://localhost:123/blah", "proj1"), new CCTrayProject("tcp://localhost:123/blah", "proj2"), new CCTrayProject("tcp://localhost:123/blah", "proj3"), }; CCTrayProject[] selectedProjects = { new CCTrayProject("tcp://localhost:123/blah", "proj1"), new CCTrayProject("tcp://localhost:123/blah", "proj2"), }; DynamicMock mockCruiseManagerFactory = new DynamicMock(typeof (ICruiseProjectManagerFactory)); mockCruiseManagerFactory.ExpectAndReturn("GetProjectList", allProjects, allProjects[0].BuildServer, false); AddProjects addProjects = new AddProjects( (ICruiseProjectManagerFactory)mockCruiseManagerFactory.MockInstance, null, selectedProjects); }
public void ShowDialogForInteractiveTesting() { AddProjects addProjects = new AddProjects(null, null, new CCTrayProject[0]); addProjects.GetListOfNewProjects(null); }