public static Project ProjectAdd()
        {
            var project = ProjectTestHelper.ProjectNew();

            project = ProjectRepository.ProjectSave(project);

            return(project);
        }
Exemple #2
0
        public static Sprint SprintNew()
        {
            var project = ProjectTestHelper.ProjectAdd();

            var sprint = SprintRepository.SprintNew(project.ProjectId);

            sprint.Name = DataHelper.RandomString(50);

            return(sprint);
        }
        public static Status StatusNew()
        {
            var status  = StatusRepository.StatusNew();
            var project = ProjectTestHelper.ProjectAdd();

            status.Name      = DataHelper.RandomString(20);
            status.ProjectId = project.ProjectId;

            return(status);
        }
Exemple #4
0
        public static Note NoteNew()
        {
            var project = ProjectTestHelper.ProjectAdd();
            var note    = NoteRepository.NoteNew();

            note.Body         = DataHelper.RandomString(1000);
            note.SourceId     = project.ProjectId;
            note.SourceTypeId = (int)SourceType.Project;

            return(note);
        }
Exemple #5
0
        public static Timeline TimelineNew()
        {
            var project  = ProjectTestHelper.ProjectAdd();
            var timeline = TimelineRepository.TimelineNew();

            timeline.Body         = DataHelper.RandomString(1000);
            timeline.SourceId     = project.ProjectId;
            timeline.SourceTypeId = (int)SourceType.Project;

            return(timeline);
        }
Exemple #6
0
        public static ProjectUser ProjectUserNew(Role roleId)
        {
            var project = ProjectTestHelper.ProjectAdd();
            var user    = UserTestHelper.UserAdd();

            var projectUserMember = ProjectUserRepository.ProjectUserNew(project.ProjectId, user.UserId);

            projectUserMember.RoleId = (int)roleId;

            return(projectUserMember);
        }
Exemple #7
0
        public static Story StoryNew()
        {
            var project = ProjectTestHelper.ProjectAdd();
            var status  = StatusTestHelper.StatusAdd();

            var story = StoryRepository.StoryNew();

            story.Description = DataHelper.RandomString(50);
            story.ProjectId   = project.ProjectId;
            story.StatusId    = status.StatusId;

            return(story);
        }