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;
 }
        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;
        }
        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 Defect( string name, int estimate, string priorityId, string statusId, Theme theme, Team team )
     : this( name, estimate, priorityId, statusId, null, theme, team ) { }
 public Story(string name, int estimate, string priorityId, string statusId, Theme theme)
     : this(name, estimate, priorityId, statusId, null, theme, null) { }