public static Attachment AttachmentNew(int sourceId, SourceType sourceType) { var attachment = AttachmentRepository.AttachmentNew(sourceId, sourceType); attachment.Name = DataHelper.RandomString(50); return(attachment); }
public static Project ProjectNew() { var project = ProjectRepository.ProjectNew(); project.Name = DataHelper.RandomString(50); return(project); }
public static Organization OrganizationNew() { var organization = OrganizationRepository.OrganizationNew(); organization.Name = DataHelper.RandomString(30); organization.Description = DataHelper.RandomString(100); return(organization); }
public static Sprint SprintNew() { var project = ProjectTestHelper.ProjectAdd(); var sprint = SprintRepository.SprintNew(project.ProjectId); sprint.Name = DataHelper.RandomString(50); return(sprint); }
public static Filter FilterNew() { var filter = FilterRepository.FilterNew(); filter.Name = DataHelper.RandomString(50); filter.FilterQuery = DataHelper.RandomString(1000); filter.SourceTypeId = (int)SourceType.User; return(filter); }
public static Status StatusNew() { var status = StatusRepository.StatusNew(); var project = ProjectTestHelper.ProjectAdd(); status.Name = DataHelper.RandomString(20); status.ProjectId = project.ProjectId; return(status); }
public static Feed FeedNew(SourceType sourceType, int sourceId) { var feed = FeedRepository.FeedNew(); feed.Action = DataHelper.RandomString(30); feed.SourceTypeId = (int)sourceType; feed.SourceId = sourceId; return(feed); }
public static string RandomEmail() { var sb = new StringBuilder(); sb.Append(DataHelper.RandomString(10)); sb.Append("@"); sb.Append(DataHelper.RandomString(20)); sb.Append(".com"); return(sb.ToString()); }
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); }
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); }
public static User UserNew() { var user = UserRepository.UserNew(); user.Email = DataHelper.RandomEmail(); user.FullName = DataHelper.RandomString(50); user.Name = DataHelper.RandomString(30); user.SetPassword(DataHelper.RandomPassword(20)); return(user); }
public static Hour HourNew() { var story = StoryTestHelper.StoryAdd(); var user = UserTestHelper.UserAdd(); var hour = HourRepository.HourNew(); hour.StoryId = story.StoryId; hour.UserId = user.UserId; hour.Notes = DataHelper.RandomString(50); return(hour); }
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); }