コード例 #1
0
		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);
		}
コード例 #2
0
		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);
		}
コード例 #3
0
		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);
		}
コード例 #4
0
        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);
                }
            }
        }
コード例 #5
0
        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);
                }
            }
        }
コード例 #6
0
		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);
		}
コード例 #7
0
		public void ShowDialogForInteractiveTesting()
		{
			AddProjects addProjects = new AddProjects(null, null, new CCTrayProject[0]);
			addProjects.GetListOfNewProjects(null);
		}
コード例 #8
0
		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);
				}
			}
		}
コード例 #9
0
        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);
                }
            }
        }