private void CreateTestData() {
            schedule = instance.Create.Schedule(TestScheduleName, new Duration(7, Duration.Unit.Days), new Duration(0, Duration.Unit.Days));

            member = instance.Create.Member("test user", "test");
            member.Save();
            
            project = instance.Create.Project(TestProjectName, AssetID.FromToken("Scope:0"), DateTime.Now.Date, schedule);

            iteration = instance.Create.Iteration(project);
            iteration.Activate();

            story1 = CreateStory(instance, "Story 1", project, iteration, instance.LoggedInMember);
            story1.Status.CurrentValue = "Future";
            story1.Save();

            if (dataLayer.EffortTracking.StoryTrackingLevel != EffortTrackingLevel.SecondaryWorkitem) {
                var story1Effort = story1.CreateEffort(EffortAmount);
                story1Effort.Save();
            }

            story2 = CreateStory(instance, "Story 2", project, iteration, member);

            task1 = CreateTask(instance, "Task 1", story1, instance.LoggedInMember);

            if (dataLayer.EffortTracking.StoryTrackingLevel != EffortTrackingLevel.PrimaryWorkitem) {
                var task1Effort = task1.CreateEffort(EffortAmount);
                task1Effort.Save();
            }

            task2 = CreateTask(instance, "Task 2", story1, member);
            task3 = CreateTask(instance, "Task 3", story2, member);
        }
 /// <summary>
 /// Create a new schedule entity with required attributes.
 /// </summary>
 /// <param name="name">Name of the new schedule</param>
 /// <param name="iterationLength">The duration an iteration will last in this schedule</param>
 /// <param name="iterationGap">The duration between iterations in this schedule.</param>
 /// <param name="attributes">Required attributes.</param>
 /// <returns>A newly minted Schedule that exists in the VersionOne system.</returns>
 public Schedule Schedule(string name, Duration iterationLength, Duration iterationGap,
     IDictionary<string, object> attributes) {
     var schedule = new Schedule(instance) {
         Name = name, 
         IterationLength = iterationLength, 
         IterationGap = iterationGap
     };
     AddAttributes(schedule, attributes);
     schedule.Save();
     return schedule;
 }
 /// <summary>
 /// Create a new project entity with a name, parent project, begin date, and optional schedule
 /// </summary>
 /// <param name="name"></param>
 /// <param name="parentProject"></param>
 /// <param name="beginDate"></param>
 /// <param name="schedule"></param>
 /// <param name="attributes">Required attributes.</param>
 /// <returns>A newly minted Project that exists in the VersionOne system.</returns>
 public Project Project(string name, Project parentProject, DateTime beginDate, Schedule schedule,
     IDictionary<string, object> attributes) {
     var project = new Project(instance) {
         Name = name, 
         ParentProject = parentProject, 
         BeginDate = beginDate, 
         Schedule = schedule
     };
     AddAttributes(project, attributes);
     project.Save();
     return project;
 }
 /// <summary>
 /// Create a new iteration with a name, begin date, and end date
 /// </summary>
 /// <param name="name">The name of the iteration</param>
 /// <param name="schedule">The schedule this iteration belongs to</param>
 /// <param name="beginDate">The begin date or start date of this iteration</param>
 /// <param name="endDate">The end date of this iteration</param>
 /// <param name="attributes">Required attributes.</param>
 /// <returns>A newly minted Iteration that exists in the VersionOne system.</returns>
 public Iteration Iteration(string name, Schedule schedule, DateTime beginDate, DateTime endDate,
     IDictionary<string, object> attributes) {
     var iteration = new Iteration(instance) {
         Name = name, 
         Schedule = schedule, 
         BeginDate = beginDate, 
         EndDate = endDate
     };
     AddAttributes(iteration, attributes);
     iteration.Save();
     return iteration;
 }
 /// <summary>
 /// Create a new iteration with a name, begin date, and end date
 /// </summary>
 /// <param name="name">The name of the iteration</param>
 /// <param name="schedule">The schedule this iteration belongs to</param>
 /// <param name="beginDate">The begin date or start date of this iteration</param>
 /// <param name="endDate">The end date of this iteration</param>
 /// <returns>A newly minted Iteration that exists in the VersionOne system.</returns>
 public Iteration Iteration(string name, Schedule schedule, DateTime beginDate, DateTime endDate) {
     return Iteration(name, schedule, beginDate, endDate, null);
 }
 /// <summary>
 /// Create a new project entity with a name, parent project, begin date, and optional schedule
 /// </summary>
 /// <param name="name"></param>
 /// <param name="parentProject"></param>
 /// <param name="beginDate"></param>
 /// <param name="schedule"></param>
 /// <returns>A newly minted Project that exists in the VersionOne system.</returns>
 public Project Project(string name, Project parentProject, DateTime beginDate, Schedule schedule) {
     return Project(name, parentProject, beginDate, schedule, null);
 }
 /// <summary>
 /// Create a new project entity with a name, parent project, begin date, and optional schedule
 /// </summary>
 /// <param name="name"></param>
 /// <param name="parentProjectID"></param>
 /// <param name="beginDate"></param>
 /// <param name="schedule"></param>
 /// <param name="attributes">Required attributes.</param>
 /// <returns>A newly minted Project that exists in the VersionOne system.</returns>
 public Project Project(string name, AssetID parentProjectID, DateTime beginDate, Schedule schedule,
     IDictionary<string, object> attributes) {
     return Project(name, new Project(parentProjectID, instance), beginDate, schedule, attributes);
 }
 /// <summary>
 /// Create a new project entity with a name, parent project, begin date, and optional schedule
 /// </summary>
 /// <param name="name"></param>
 /// <param name="parentProjectID"></param>
 /// <param name="beginDate"></param>
 /// <param name="schedule"></param>
 /// <returns>A newly minted Project that exists in the VersionOne system.</returns>
 public Project Project(string name, AssetID parentProjectID, DateTime beginDate, Schedule schedule) {
     return Project(name, new Project(parentProjectID, instance), beginDate, schedule);
 }