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

            project = ProjectRepository.ProjectSave(project);

            return(project);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }