public void Test_add_valid_project() { //Given var projectManager = new ProjectManager(Guid.NewGuid()); //When projectManager.AddProject("teste 1", DateTime.Now, DateTime.Now.AddDays(10)); projectManager.AddProject("teste 2", DateTime.Now.AddDays(11), DateTime.Now.AddDays(21)); //Then Assert.Equal(2, projectManager.Projects.Count); }
public void ResetBuildStatusForAllProjects() { // Initialize engine. Need two separate engines because we don't allow two // projects with the same full path to be loaded in the same Engine. Engine engine1 = new Engine(@"c:\"); Engine engine2 = new Engine(@"c:\"); // Instantiate new project manager. ProjectManager projectManager = new ProjectManager(); // Set up a global property group. BuildPropertyGroup globalProperties = new BuildPropertyGroup(); globalProperties.SetProperty("Configuration", "Release"); // Create a few new projects. Project project1 = new Project(engine1); project1.FullFileName = @"c:\rajeev\temp\myapp.proj"; project1.GlobalProperties = globalProperties; Project project2 = new Project(engine1); project2.FullFileName = @"c:\blah\foo.proj"; project2.GlobalProperties = globalProperties; Project project3 = new Project(engine2); project3.FullFileName = @"c:\blah\foo.proj"; globalProperties.SetProperty("Configuration", "Debug"); project3.GlobalProperties = globalProperties; // Add the new projects to the ProjectManager. projectManager.AddProject(project1); projectManager.AddProject(project2); projectManager.AddProject(project3); // Put all the projects in a non-reset state. project1.IsReset = false; project2.IsReset = false; project3.IsReset = false; // Call ResetAllProjects. projectManager.ResetBuildStatusForAllProjects(); // Make sure they all got reset. Assertion.Assert(project1.IsReset); Assertion.Assert(project2.IsReset); Assertion.Assert(project3.IsReset); }
private void btnProjectAction_Click(object sender, RoutedEventArgs e) { if (this.btnProjectAction.Content.ToString() == "Save") { captureNewProject(); try { _projectManager.EditProject(_oldProject, _newProject); this.DialogResult = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Update Incomplete!"); } } else if (this.btnProjectAction.Content.ToString() == "Add") { captureNewProject(); try { _projectManager.AddProject(_newProject); this.DialogResult = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Add Project Incomplete!"); } } }
public JsonResult AddProjectJson(Project project, List <Reward> rewards) { int response = -1; project.user = (Session["user"] as User); /* for (int i = 0; i < project.Rewards.Count; i++) * { * project.Rewards[i].Project = project; * project.Rewards[i].ProjectId = project.Id; * } * */ if (ModelState.IsValid) { project.ImageOfProject = new byte[4]; project.Rewards = rewards; Response.Write("<script>" + Request.Files.Count + "</script>"); ProjectManager pm = new ProjectManager(); response = pm.AddProject(project); //HttpPostedFileBase file = Request.Files["ImageOfProject"]; //string path = System.IO.Path.Combine(Server.MapPath("~/ProjectImages/"+response)); //file.SaveAs(path); Session["addingImageId"] = response; return(Json(new { res = response }, JsonRequestBehavior.DenyGet)); } return(Json(new { res = response }, JsonRequestBehavior.DenyGet)); // return Json(response); }
public void UpdateProject() { Project project = new Project(); project.ProjectStatus = OProjectStatus.Refused; project.Code = "TEST"; project.Name = "PROJECT"; project.Aim = "Not Set"; project.BeginDate = TimeProvider.Today; Person person = new Person(); person.Id = new DataHelper().AddGenericTiersIntoDatabase(OClientTypes.Person); ProjectManager projectManager = new ProjectManager(DataUtil.TESTDB); project.Id = projectManager.AddProject(project, person.Id, null); project.ProjectStatus = OProjectStatus.Refused; project.Code = "TEST2"; project.Name = "PROJECT2"; project.Aim = "Not Set2"; project.BeginDate = TimeProvider.Today.AddDays(1); projectManager.UpdateProject(project, null); Project selectedProject = projectManager.SelectProject(project.Id); Assert.AreEqual(OProjectStatus.Refused, selectedProject.ProjectStatus); Assert.AreEqual("TEST2", selectedProject.Code); Assert.AreEqual("PROJECT2", selectedProject.Name); Assert.AreEqual("Not Set2", selectedProject.Aim); Assert.AreEqual(TimeProvider.Today.AddDays(1), selectedProject.BeginDate); }
public void SimpleAddAndRetrieveProject() { // Initialize engine. Engine engine = new Engine(@"c:\"); // Instantiate new project manager. ProjectManager projectManager = new ProjectManager(); // Set up variables that represent the information we would be getting from // the "MSBuild" task. string fullPath = @"c:\rajeev\temp\myapp.proj"; BuildPropertyGroup globalProperties = new BuildPropertyGroup(); globalProperties.SetProperty("Configuration", "Debug"); // Create a new project that matches the information that we're pretending // to receive from the MSBuild task. Project project1 = new Project(engine); project1.FullFileName = fullPath; project1.GlobalProperties = globalProperties; // Add the new project to the ProjectManager. projectManager.AddProject(project1); // Try and retrieve the project from the ProjectManager based on the fullpath + globalprops, // and make sure we get back the same project we added. Assertion.AssertEquals(project1, projectManager.GetProject(fullPath, globalProperties, null)); }
public async Task Test_get_user_projects() { using (var scope = _webApplicationFactory.CreateScope()) { var client = await _webApplicationFactory.CreateAuthenticatedClientForDefaultUserAsync(scope); var ef = _webApplicationFactory.GetContext(scope); var user = await ef.Users.FirstAsync(); // dados da requsição var projectManager = new ProjectManager(user.Identifier); projectManager.AddProject("test1", DateTime.Now, DateTime.Now.AddDays(2)); ef.ProjectManagers.Add(projectManager); await ef.SaveChangesAsync(); var projects = await ef.Projects.ToListAsync(); Assert.Single(projects); // realiza requisição var response = await client.GetAsync("/api/project-management/"); // resultadp var result = await response.Content.ReadAsStringAsync(); var objectResult = JsonConvert.DeserializeObject <ProjectManagerItem>(result); response.EnsureSuccessStatusCode(); Assert.Single(objectResult.Projects); } }
public ActionResult Create_Project(Project project) { var user = (User)Session["UserInfo"]; if (user == null) { return(RedirectToAction("Login", "Login")); } ViewBag.Link = "Home"; if (!ModelState.IsValid) { return(View()); } if ("ScrumMaster" != UserManager.GetUserByEmail(user.Email).Role) { ViewBag.Error = "Only Scrum Masters can create Projects"; return(View()); } project.ScrumMaster = user.Email; var result = ProjectManager.AddProject(project, user.Email, out project); ViewBag.Error = result; if (!String.IsNullOrEmpty(result)) { return(View()); } Session["Project"] = project; return(RedirectToAction("Home", "Project", new { projectName = project.Name })); }
public void SimpleAddAndRetrieveProjectWithDifferentFullPath() { // Initialize engine. Engine engine = new Engine(@"c:\"); // Instantiate new project manager. ProjectManager projectManager = new ProjectManager(); // Set up variables that represent the information we would be getting from // the "MSBuild" task. BuildPropertyGroup globalProperties = new BuildPropertyGroup(); globalProperties.SetProperty("Configuration", "Release"); // Create a new project that matches the information that we're pretending // to receive from the MSBuild task. Project project1 = new Project(engine); project1.FullFileName = @"c:\rajeev\temp\myapp.proj"; project1.GlobalProperties = globalProperties; // Add the new project to the ProjectManager. projectManager.AddProject(project1); // Now search for a project with a different full path but same set of global // properties. We expect to get back null, because no such project exists. Assertion.AssertNull(projectManager.GetProject(@"c:\blah\wrong.proj", globalProperties, null)); }
public void AddProjectAndSelectProjectById() { Project project = new Project(); project.ProjectStatus = OProjectStatus.Refused; project.Code = "TEST"; project.Name = "PROJECT"; project.Aim = "Not Set"; project.BeginDate = TimeProvider.Today; Person person = new Person(); person.Id = new DataHelper().AddGenericTiersIntoDatabase(OClientTypes.Person); project.Credits.Add(_AddCredit()); ProjectManager projectManager = new ProjectManager(DataUtil.TESTDB); int projectId = projectManager.AddProject(project, person.Id, null); Project selectedProject = projectManager.SelectProject(projectId); Assert.AreEqual(projectId, selectedProject.Id); Assert.AreEqual("TEST", selectedProject.Code); Assert.AreEqual("PROJECT", selectedProject.Name); Assert.AreEqual("Not Set", selectedProject.Aim); Assert.AreEqual(OProjectStatus.Refused, selectedProject.ProjectStatus); Assert.AreEqual(1, selectedProject.Credits.Count); Assert.AreEqual(TimeProvider.Today, selectedProject.BeginDate); }
public void RemoveProjectsByFullPath() { // Initialize engine. Need two separate engines because we don't allow two // projects with the same full path to be loaded in the same Engine. Engine engine1 = new Engine(@"c:\"); Engine engine2 = new Engine(@"c:\"); // Instantiate new project manager. ProjectManager projectManager = new ProjectManager(); // Set up a global property group. BuildPropertyGroup globalProperties = new BuildPropertyGroup(); globalProperties.SetProperty("Configuration", "Release"); // Create a few new projects. Project project1 = new Project(engine1); project1.FullFileName = @"c:\rajeev\temp\myapp.proj"; project1.GlobalProperties = globalProperties; Project project2 = new Project(engine1); project2.FullFileName = @"c:\blah\foo.proj"; project2.GlobalProperties = globalProperties; Project project3 = new Project(engine2); project3.FullFileName = @"c:\blah\foo.proj"; globalProperties.SetProperty("Configuration", "Debug"); project3.GlobalProperties = globalProperties; // Add the new projects to the ProjectManager. projectManager.AddProject(project1); projectManager.AddProject(project2); projectManager.AddProject(project3); // Remove all projects with the full path "c:\blah\foo.proj" (case insenstively). projectManager.RemoveProjects(@"c:\BLAH\FOO.Proj"); // Make sure project 1 is still there. Assertion.AssertEquals(project1, projectManager.GetProject(project1.FullFileName, project1.GlobalProperties, null)); // Make sure projects 2 and 3 are gone. Assertion.AssertNull(projectManager.GetProject(project2.FullFileName, project2.GlobalProperties, null)); Assertion.AssertNull(projectManager.GetProject(project3.FullFileName, project3.GlobalProperties, null)); }
public void SelectFiewProjectsByClientId() { Project project1 = new Project(); project1.ProjectStatus = OProjectStatus.Refused; project1.Code = "TEST"; project1.Name = "PROJECT"; project1.Aim = "Not Set"; project1.BeginDate = TimeProvider.Today; Project project2 = new Project(); project2.ProjectStatus = OProjectStatus.Refused; project2.Code = "TEST"; project2.Name = "PROJECT"; project2.Aim = "Not Set"; project2.BeginDate = TimeProvider.Today; Project project3 = new Project(); project3.ProjectStatus = OProjectStatus.Refused; project3.Code = "TEST"; project3.Name = "PROJECT"; project3.Aim = "Not Set"; project3.BeginDate = TimeProvider.Today; Person person = new Person(); person.Id = new DataHelper().AddGenericTiersIntoDatabase(OClientTypes.Person); ProjectManager projectManager = new ProjectManager(DataUtil.TESTDB); project1.Id = projectManager.AddProject(project1, person.Id, null); project2.Id = projectManager.AddProject(project2, person.Id, null); project3.Id = projectManager.AddProject(project3, person.Id, null); List <Project> list = projectManager.SelectProjectsByClientId(person.Id); Assert.AreEqual(3, list.Count); }
private bool tryPost(ref Model.Project model, out string errMsg) { errMsg = ""; bool re = false; model.Creater = this.auth.UserId; model.CreatedDate = DateTime.Now; model.Modifier = this.auth.UserId; model.ModifiedDate = DateTime.Now; if (ProjectManager.AddProject(ref model, out errMsg)) { re = true; } return(re); }
public void Test_add_invalid_date_project_should_throw_exception() { // given var projectManager = new ProjectManager(Guid.NewGuid()); // projeto valido projectManager.AddProject("teste 1", DateTime.Now, DateTime.Now.AddDays(10)); // projeto com data final anterior ao começo Assert.Throws <InvalidProjectDateException>(() => { projectManager.AddProject("teste 2", DateTime.Now, DateTime.Now.AddDays(-10)); }); // projeto invaldo: fica entre o projeto valido "teste 1" Assert.Throws <InvalidProjectDateException>(() => { projectManager.AddProject("teste 3", DateTime.Now.AddDays(2), DateTime.Now.AddDays(4)); }); // projeto invaldo: data de começo fica entre o projeto valido "teste 1" Assert.Throws <InvalidProjectDateException>(() => { projectManager.AddProject("teste 4", DateTime.Now.AddDays(2), DateTime.Now.AddDays(20)); }); // projeto invaldo: data de final fica entre o projeto valido "teste 1" Assert.Throws <InvalidProjectDateException>(() => { projectManager.AddProject("teste 4", DateTime.Now.AddDays(-10), DateTime.Now.AddDays(2)); }); }
private async Task <Project> GetOrCreateProjectManagerAndAddProject(Guid userIdentifier, NewProject newProjectData) { var exists = await _projectMangerRepository.GetByUserIdentifierAsync(userIdentifier); Project project; if (exists == null) { var projectManager = new ProjectManager(userIdentifier); project = projectManager.AddProject(newProjectData.Title, newProjectData.StartDate, newProjectData.FinishDate); _projectMangerRepository.Add(projectManager); return(project); } project = exists.AddProject(newProjectData.Title, newProjectData.StartDate, newProjectData.FinishDate); _projectMangerRepository.Update(exists); return(project); }
public ActionResult AddNewProject(ProjectModel np, string selectClient) { ViewBag.Url = "/Images/" + User.Identity.Name + "_profile.jpg"; DAL d = new DAL(); ViewBag.RoleId = d.getRoleID(CurrentUser.Role); if (ModelState.IsValid) { ProjectManager pm = new ProjectManager(); var c = pm.FetchClients(); ViewBag.Clients = c; if (!pm.DoesTitleExist(np.Title)) { if (!pm.CheckTitle(np.Title)) { ModelState.AddModelError("", "Project title is too long."); return(View(np)); } else if (!pm.CheckCap(np.Cap)) { ModelState.AddModelError("", "Cap is too large."); return(View(np)); } else if (!pm.CheckCapFormat(np.Cap)) { ModelState.AddModelError("", "Cap must be a number"); return(View(np)); } string s = CurrentUser.Sid; pm.AddProject(np, selectClient, s); return(RedirectToAction("BrowseProjects")); } else { ModelState.AddModelError("", "Project title already taken."); return(View(np)); } } return(View(np)); }
public void TestForDuplicatesInProjectTable() { ProjectManager projectManager = new ProjectManager(); string fullPath = @"c:\foo\bar.proj"; BuildPropertyGroup globalProperties = new BuildPropertyGroup(); globalProperties.SetProperty("p1", "v1"); Project p = new Project(new Engine()); p.FullFileName = fullPath; p.GlobalProperties = globalProperties; p.ToolsVersion = "4.0"; // Add the new project to the ProjectManager, twice Hashtable table = new Hashtable(StringComparer.OrdinalIgnoreCase); ProjectManager.AddProject(table, p); ProjectManager.AddProject(table, p); Assertion.AssertEquals(1, ((ArrayList)table[fullPath]).Count); // Didn't add a duplicate // Add a second, slightly different project, and ensure it DOES get added Project p2 = new Project(new Engine()); p2.FullFileName = fullPath; p2.GlobalProperties = globalProperties; p2.ToolsVersion = "2.0"; ProjectManager.AddProject(table, p2); Project p3 = new Project(new Engine()); p3.FullFileName = fullPath; p3.GlobalProperties = new BuildPropertyGroup(); p3.ToolsVersion = "2.0"; ProjectManager.AddProject(table, p3); Assertion.AssertEquals(3, ((ArrayList)table[fullPath]).Count); }
public void AddProject(ProjectViewModel projectViewModel) { try { tbl_Projects tblProject = new tbl_Projects(); tblProject.ProjectName = projectViewModel.ProjectName; tblProject.RegionId = projectViewModel.RegionId; tblProject.ProjectID = projectViewModel.ProjectID; tblProject.ClientId = projectViewModel.ClientID; tblProject.EntityState = DA.DomainModel.EntityState.Added; ProjectManager projectManager = new ProjectManager(); projectManager.AddProject(tblProject); } catch (Exception) { throw; } }
public void SelectUniqueProjectsByClientId() { Project project = new Project(); project.ProjectStatus = OProjectStatus.Refused; project.Code = "TEST"; project.Name = "PROJECT"; project.Aim = "Not Set"; project.BeginDate = TimeProvider.Today; Person person = new Person(); person.Id = new DataHelper().AddGenericTiersIntoDatabase(OClientTypes.Person); project.Credits.Add(_AddCredit()); ProjectManager projectManager = new ProjectManager(DataUtil.TESTDB); project.Id = projectManager.AddProject(project, person.Id, null); List <Project> list = projectManager.SelectProjectsByClientId(person.Id); Assert.AreEqual(1, list.Count); Assert.AreEqual(OProjectStatus.Refused, list[0].ProjectStatus); Assert.AreEqual(1, list[0].Credits.Count); }
public void CreateProject() { Project result = _pm.AddProject("SBC", "SBC Default Project"); Assert.AreEqual("SBC", result.ID); }
public void Init() { if (UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "ScrumMaster" }) == "") { UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "ScrumMaster" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); UserManager.RegisterUser(new Register { Email = "[email protected]", Password = "******", Username = "******", Role = "Developer" }); var proj = new Project { Name = "OnlineScrum", DevTeamList = new List <string> { "[email protected]", "[email protected]", "[email protected]" }, ProjectID = 1, Sprints = "", ScrumMaster = "[email protected]", Description = "This is a mock example to demonstrate the features in this platform." }; var sprint1 = new Sprint { StartDate = DateTime.Now.AddDays(-60), MeetingInterval = 1, MeetingLocation = "X", SprintID = 1, SprintName = "Requirements Analysis", SprintNumber = 1, FinishDate = DateTime.Now.AddDays(-45) }; var sprint2 = new Sprint { StartDate = DateTime.Now.AddDays(-45), MeetingInterval = 1, MeetingLocation = "X", SprintID = 2, SprintName = "Design", SprintNumber = 2, FinishDate = DateTime.Now.AddDays(-30) }; var sprint3 = new Sprint { StartDate = DateTime.Now.AddDays(-30), MeetingInterval = 1, MeetingLocation = "X", SprintID = 3, SprintName = "Initial Implementation", SprintNumber = 3, FinishDate = DateTime.Now.AddDays(-15) }; var sprint3_2 = new Sprint { StartDate = DateTime.Now.AddDays(-15), MeetingInterval = 1, MeetingLocation = "X", SprintID = 4, SprintName = "Final Implementation", SprintNumber = 4, FinishDate = DateTime.Now.AddDays(15) }; var sprint4 = new Sprint { StartDate = DateTime.Now.AddDays(15), MeetingInterval = 1, MeetingLocation = "X", SprintID = 5, SprintName = "Verification", SprintNumber = 5, FinishDate = DateTime.Now.AddDays(30) }; var sprint5 = new Sprint { StartDate = DateTime.Now.AddDays(30), MeetingInterval = 1, MeetingLocation = "X", SprintID = 1, SprintName = "Maintenance", SprintNumber = 1, FinishDate = DateTime.Now.AddDays(45) }; var item1 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 1, ItemName = "Customer Requirements", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-55), }; var item2 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 2, ItemName = "Architectural Requirements", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-53) }; var item3 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 3, ItemName = "Functional Requirements", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-50) }; var item4 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 4, ItemName = "Core Funcionality Requirements", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-47) }; var item5 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 5, ItemID = 5, ItemName = "Non Functional Requirements", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-46) }; var item6 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 6, ItemName = "DB Design", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-44) }; var item7 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 7, ItemName = "Architecture Design", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-40), }; var item8 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 8, ItemName = "Security Design", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-38) }; var item9 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 9, ItemName = "Interface Mockup", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-37) }; var item10 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 10, ItemName = "Usability Design", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-33), }; var item11 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 11, ItemName = "Use Cases", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-31) }; var item12 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 12, ItemName = "Item", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-31) }; var item13 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 13, ItemName = "Login", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-27), }; var item14 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 14, ItemName = "Project", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-23), }; var item15 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 15, ItemName = "Database", ItemStatus = "Delayed" }; var item16 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 16, ItemName = "Interaction with Database", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-17), }; var item17 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 17, ItemName = "User", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-16), }; var item18 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 18, ItemName = "Meeting", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-14), }; var item19 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 19, ItemName = "Statistics", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-12), }; var item20 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 20, ItemName = "Interface", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-10), }; var item21 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 21, ItemName = "Security", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-7), }; var item22 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 22, ItemName = "Burndown Chart", ItemStatus = "Closed", DateClosed = DateTime.Now.AddDays(-3), }; var item23 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 23, ItemName = "Velocity Chart", ItemStatus = "Testing", }; var item24 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 24, ItemName = "Multiple Projects", ItemStatus = "Developing", }; var item25 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 1, ItemID = 25, ItemName = "Settings", ItemStatus = "Developing", }; var item26 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 26, ItemName = "Refactor", ItemStatus = "Developing", }; var item27 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 27, ItemName = "Usability tests", ItemStatus = "Testing", }; var item28 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 28, ItemName = "Sprint", ItemStatus = "Testing", }; var item29 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 2, ItemID = 29, ItemName = "Product Backlog", ItemStatus = "Developing", }; var item30 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 30, ItemName = "Meeting Table", ItemStatus = "Testing" }; var s1 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 5, ItemID = 28, ItemName = "Migrate to Cloud", ItemStatus = "Developing", SprintlessProjectID = 1 }; var s2 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 4, ItemID = 29, ItemName = "Language Support", ItemStatus = "Developing", SprintlessProjectID = 1 }; var s3 = new Item { AssignedTo = "[email protected]", EstimatedEffort = 3, ItemID = 30, ItemName = "Contact Support", ItemStatus = "Developing", SprintlessProjectID = 1 }; ProjectManager.AddProject(proj, "[email protected]", out proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint1, proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint2, proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint3, proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint3_2, proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint4, proj); proj = ProjectManager.GetProjectByEmail("[email protected]"); ProjectManager.AddSprint(sprint5, proj); SprintManager.AddItem(sprint1, item1); sprint1 = SprintManager.GetSprintFromID(sprint1.SprintID); SprintManager.AddItem(sprint1, item2); sprint1 = SprintManager.GetSprintFromID(sprint1.SprintID); SprintManager.AddItem(sprint1, item3); sprint1 = SprintManager.GetSprintFromID(sprint1.SprintID); SprintManager.AddItem(sprint1, item4); sprint1 = SprintManager.GetSprintFromID(sprint1.SprintID); SprintManager.AddItem(sprint1, item5); SprintManager.AddItem(sprint2, item6); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item7); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item8); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item9); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item10); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item11); sprint2 = SprintManager.GetSprintFromID(sprint2.SprintID); SprintManager.AddItem(sprint2, item12); sprint3 = SprintManager.GetSprintFromID(sprint3.SprintID); SprintManager.AddItem(sprint3, item13); sprint3 = SprintManager.GetSprintFromID(sprint3.SprintID); SprintManager.AddItem(sprint3, item14); sprint3 = SprintManager.GetSprintFromID(sprint3.SprintID); SprintManager.AddItem(sprint3, item15); sprint3 = SprintManager.GetSprintFromID(sprint3.SprintID); SprintManager.AddItem(sprint3, item16); sprint3 = SprintManager.GetSprintFromID(sprint3.SprintID); SprintManager.AddItem(sprint3, item17); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item18); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item19); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item20); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item21); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item22); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item23); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item24); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item25); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item26); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item27); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item28); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item29); sprint3_2 = SprintManager.GetSprintFromID(sprint3_2.SprintID); SprintManager.AddItem(sprint3_2, item30); ProjectManager.ChangeSprintInItem(new List <SprintItem> { new SprintItem { Item = "15", Sprint = sprint3_2.SprintName } }, proj.ProjectID); SprintManager.AddItem(null, s1); SprintManager.AddItem(null, s2); SprintManager.AddItem(null, s3); } }