Exemplo n.º 1
0
        public void AutoTriage(ITriageBugService triageBugService)
        {
            if (Status != Status.New)
            {
                throw new DomainException("Cannot triage not new bug");
            }

            var severityFromExternalService = triageBugService.GetSeverity(Title, Description);
            var priorityFromExternalService = triageBugService.GetPriority(Title, Description);

            Severity = MapSeverityFromExternalService(severityFromExternalService);
            Priority = MapPriorityFromExternalService(priorityFromExternalService);
            Status   = Status.Todo;
            UpdateEditionDateTime();
        }
 public AutoTriageUseCase(IBugRepository bugRepository, ITriageBugService triageBugService, IUnitOfWork unitOfWork)
 {
     _bugRepository    = bugRepository;
     _triageBugService = triageBugService;
     _unitOfWork       = unitOfWork;
 }