RandomString() 공개 정적인 메소드

public static RandomString ( int length ) : string
length int
리턴 string
        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);
        }
예제 #4
0
        public static Sprint SprintNew()
        {
            var project = ProjectTestHelper.ProjectAdd();

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

            sprint.Name = DataHelper.RandomString(50);

            return(sprint);
        }
예제 #5
0
        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);
        }
예제 #6
0
        public static Status StatusNew()
        {
            var status  = StatusRepository.StatusNew();
            var project = ProjectTestHelper.ProjectAdd();

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

            return(status);
        }
예제 #7
0
        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);
        }
예제 #8
0
        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());
        }
예제 #9
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);
        }
예제 #10
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);
        }
예제 #11
0
        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);
        }
예제 #12
0
        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);
        }
예제 #13
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);
        }