예제 #1
0
 public static void AddIterationStories(Project project, Iteration iteration)
 {
     project.Stories.Add(CreateIterationStory("List of Books by Author", 1, Utils.PriorityHigh, Utils.StatusNone, iteration, Theme.ThemeStorefront, Team.TeamBeta)); 
     project.Stories.Add(CreateIterationStory("List of Books by Title", 3, Utils.PriorityMedium, Utils.StatusNone, iteration, Theme.ThemeStorefront, Team.TeamAlpha)); 
     project.Stories.Add(CreateIterationStory("List of Books by Genre", 5, Utils.PriorityHigh, Utils.StatusNone, iteration, Theme.ThemeStorefront, Team.TeamBeta)); 
     project.Stories.Add(CreateIterationStory("View Book Details", 2, Utils.PriorityMedium, Utils.StatusNone, iteration, Theme.ThemeStorefront, Team.TeamBeta)); 
     project.Stories.Add(CreateIterationStory("Search by Author", 5, Utils.PriorityMedium, Utils.StatusDone, iteration, Theme.ThemeStorefront, Team.TeamAlpha)); 
 }
 public Defect( string name, int estimate, string priorityId, string statusId, Iteration iteration, Theme theme, Team team )
 {
     Tasks = new List<Task>();
     Tests = new List<Test>();
     Name = name;
     Estimate = estimate;
     PriorityId = priorityId;
     StatusId = statusId;
     Iteration = iteration;
     Team = team;
     Theme = theme;
 }
        public static void AddIterations(Project project)
        {
            switch (Program._v1ClientTarget)
            {
                case "CapitalOne":
                {
                    //Iteration 1
                    DateTime beginDate = Utils.GetTodaysDateNoTime().AddDays(-2);
                    DateTime endDate = Utils.GetTodaysDateNoTime().AddDays(12);
                    Iteration iteration = new Iteration("Sprint 1", "State:101", beginDate, endDate) { Target = 14 };
                    project.Iterations.Add(iteration);

                    //Iteration 2
                    beginDate = endDate;
                    endDate = beginDate.AddDays(14);
                    iteration = new Iteration("Sprint 2", "State:101", beginDate, endDate) { Target = 14 };
                    project.Iterations.Add(iteration);

                    //Iteration 3
                    beginDate = endDate;
                    endDate = beginDate.AddDays(14);
                    iteration = new Iteration("Sprint 3", "State:100", beginDate, endDate) { Target = 14 };
                    project.Iterations.Add(iteration);
                    break;
                }

                default:
                {
                    //Iteration 1
                    DateTime beginDate = Utils.GetTodaysDateNoTime();
                    DateTime endDate = Utils.GetTodaysDateNoTime().AddDays(7);
                    Iteration iteration = new Iteration("Iteration 1", "State:101", beginDate, endDate) { Target = 16 };
                    project.Iterations.Add(iteration);

                    //Iteration 2
                    beginDate = endDate;
                    endDate = beginDate.AddDays(7);
                    iteration = new Iteration("Iteration 2", "State:100", beginDate, endDate) { Target = 16 };
                    project.Iterations.Add(iteration);

                    //Iteration 3
                    beginDate = endDate;
                    endDate = beginDate.AddDays(7);
                    iteration = new Iteration("Iteration 3", "State:100", beginDate, endDate) { Target = 16 };
                    project.Iterations.Add(iteration);
                    break;
                }
            }
        }
        private static Defect CreateIterationDefect(string name, int estimate, string priority, string status, Iteration iteration, Theme theme, Team team )
        {
            bool done = (status == Utils.StatusDone | status == Utils.StatusAccepted);
            Random r = new Random();
            int i;

            Defect defect = new Defect(name, estimate, priority, status, iteration, theme, team);
            i = r.Next(1, 2);
            defect.Tasks.Add(new Task( "Verify fix", i, (done ? 0 : i)));
            i = r.Next(1, 16);
            defect.Tasks.Add(new Task( "Ensure standards", i, (done ? 0 : i)));
            string testName = name.Replace(" ", "");
            i = r.Next(1, 8);
            defect.Tests.Add(new Test("Fitnesse Test " + testName, i, (done ? 0 : i)));

            return defect;
        }
예제 #5
0
        private static Story CreateIterationStory(string name, int estimate, string priority, string status, Iteration iteration, Theme theme, Team team)
        {
            Story story = new Story(name, estimate, priority, status, iteration, theme, team);

            bool done = (status == Utils.StatusDone | status == Utils.StatusAccepted);
            Random r = new Random();
            int i;

            i = r.Next(1, 3);
            story.Tasks.Add(new Task("Create Database Tables", i, (done ? 0 : i)));
            i = r.Next(1, 16); 
            story.Tasks.Add(new Task("Design UI", i, (done ? 0 : i)));

            if (estimate > 1)
            {
                i = r.Next(1, 8);
                story.Tasks.Add(new Task("Code Business Objects", i, (done ? 0 : i)));
            }

            if (estimate > 2)
            {
                i = r.Next(1, 4);
                story.Tasks.Add(new Task("Write Javascript", i, (done ? 0 : r.Next(i))));
                i = r.Next(1, 4);
                story.Tasks.Add(new Task("Code DAO", i, (done ? 0 : i))); 
            }

            if (estimate > 3)
            {
                i = r.Next(1, 16);
                story.Tasks.Add(new Task("Write Integration Interface", i, (done ? 0 : i)));
            }

            string testName = name.Replace(" ", "");
            i = r.Next(1, 8);
            story.Tests.Add(new Test("Fitnesse Test " + testName, i, (done ? 0 : i))); 

            return story;
        }
 public static void AddIterationDefects(Project project, Iteration iteration)
 {
     project.Defects.Add(CreateIterationDefect("Fix performance SLA on load", 1, Utils.PriorityHigh, Utils.StatusInProgress, iteration, Theme.ThemeStorefront, Team.TeamBeta));
     project.Defects.Add(CreateIterationDefect("Correct warning message label", 3, Utils.PriorityMedium, Utils.StatusNone, iteration, Theme.ThemeStorefront, Team.TeamAlpha));
 }