Пример #1
0
 public CatalogContext(IPublisherFactory publisherFactory,
                       ITitleFactory titleFactory,
                       IIssueFactory issueFactory)
 {
     PublisherFactory = publisherFactory;
     TitleFactory     = titleFactory;
     IssueFactory     = issueFactory;
 }
Пример #2
0
 public BugCommandHandler(BugRepository bugRepository, IIssueFactory issueFactory, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, CallContext callContext)
 {
     this.bugRepository        = bugRepository;
     this.issueFactory         = issueFactory;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.callContext          = callContext;
 }
Пример #3
0
        protected override IssueRepository CreateSut()
        {
            connection            = Mock <IConnection>();
            issue                 = Mock <IIssue>();
            deSerializedIssueMock = new DeserializedIssueMock(issue);
            commentCollection     = CreateCommentsWrapper();
            issueFactory          = Mock <IIssueFactory>();

            return(new IssueRepository(connection, issueFactory));
        }
Пример #4
0
 public NfrCommandHandler(NfrRepository nfrRepository, IIssueFactory issueFactory, ProjectRepository projectRepository, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, CallContext callContext)
 {
     this.nfrRepository        = nfrRepository;
     this.issueFactory         = issueFactory;
     this.projectRepository    = projectRepository;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.callContext          = callContext;
 }
Пример #5
0
 public TaskCommandHandler(TaskRepository taskRepository, IIssueFactory taskFactory, ProjectRepository projectRepository, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, IBugMapper bugMapper, CallContext callContext)
 {
     this.taskRepository       = taskRepository;
     this.taskFactory          = taskFactory;
     this.projectRepository    = projectRepository;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.bugMapper            = bugMapper;
     this.callContext          = callContext;
 }
Пример #6
0
        public void AddBug(IIssueFactory issueFactory, AddBugToTask command)
        {
            if (Status == IssueStatus.Done)
            {
                throw new CannotAddChildIssueWhenParentIssueIsDone <Task, ChildBug>(Id);
            }

            var bug = System.Threading.Tasks.Task.Run(() => issueFactory.GenerateChildBug(command)).GetAwaiter().GetResult();

            Bugs.Add(bug);
            Update(new BugAddedToTask(bug.Id, Id, ProjectId, bug.Title, bug.Description, bug.ReporterId, bug.AssigneeId, bug.Labels.Select(x => x.Id).ToList(), bug.CreatedAt));
        }
Пример #7
0
        public async System.Threading.Tasks.Task AddBug(IIssueFactory issueFactory, AddBugToNfr command)
        {
            if (Status == IssueStatus.Done)
            {
                throw new CannotAddChildIssueWhenParentIssueIsDone <Nfr, ChildBug>(Id);
            }

            var bug = await issueFactory.GenerateChildBug(command);

            Bugs.Add(bug);
            Update(new BugAddedToNfr(bug.Id, Id, ProjectId, bug.Title, bug.Description, bug.ReporterId, bug.AssigneeId, bug.Labels.Select(x => x.Id).ToList(), bug.CreatedAt));
        }
Пример #8
0
        public void AddSubtask(IIssueFactory issueFactory, AddSubtaskToTask command)
        {
            if (Status == IssueStatus.Done)
            {
                throw new CannotAddChildIssueWhenParentIssueIsDone <Task, Subtask>(Id);
            }

            var subtask = System.Threading.Tasks.Task.Run(() => issueFactory.GenerateSubtask(command)).GetAwaiter().GetResult();

            Subtasks.Add(subtask);
            Update(new SubtaskAddedToTask(subtask.Id, Id, ProjectId, subtask.Title, subtask.Description,
                                          subtask.ReporterId, subtask.AssigneeId, subtask.Labels.Select(x => x.Id).ToList(), subtask.CreatedAt));
        }
Пример #9
0
 public IssueRepository(IConnection connection, IIssueFactory issueFactory)
 {
     this.connection   = connection;
     this.issueFactory = issueFactory;
 }
Пример #10
0
 public IssueRepository(IConnection connection, IIssueFactory issueFactory)
 {
     this.connection = connection;
     this.issueFactory = issueFactory;
 }
Пример #11
0
 public IssueService(IIssueFactory issueFactory)
 {
     _issueFactory = issueFactory;
 }