Ejemplo n.º 1
0
        public static Project ProjectAdd()
        {
            var project = ProjectTestHelper.ProjectNew();

            project = ProjectRepository.ProjectSave(project);

            return(project);
        }
Ejemplo n.º 2
0
        public static Sprint SprintNew()
        {
            var project = ProjectTestHelper.ProjectAdd();

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

            sprint.Name = DataHelper.RandomString(50);

            return(sprint);
        }
Ejemplo n.º 3
0
        public static Status StatusNew()
        {
            var status  = StatusRepository.StatusNew();
            var project = ProjectTestHelper.ProjectAdd();

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

            return(status);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }