public static CreateResponsibilityTasksFromWizardRequest Create(long companyId, Guid userId, long siteId, long responsibilityId, long taskTemplateid, TaskReoccurringType frequency, Guid? assigneeId, string startDate, string endDate, Guid taskGuid)
        {
            var result = new CreateResponsibilityTasksFromWizardRequest
                             {
                                 CompanyId = companyId,
                                 UserId = userId,
                                 SiteId = siteId,
                                 ResponsibilityId = responsibilityId,
                                 TaskTemplateId = taskTemplateid,
                                 Frequency = frequency,
                                 AssigneeId = assigneeId.HasValue ? assigneeId.Value : Guid.NewGuid(),
                                 StartDate = DateTime.Parse(startDate),
                                 EndDate = !string.IsNullOrEmpty(endDate) ? DateTime.Parse(endDate) : (DateTime?)null,
                                 TaskGuid = taskGuid
                             };

            return result;
        }
        // todo: refactor this to use CreateManyResponsibilityTaskFromWizard below, just with a single taskDetail - vl 310713
        public void CreateResponsibilityTaskFromWizard(CreateResponsibilityTasksFromWizardRequest request)
        {
            var saveResponsibilityTaskRequest = SaveResponsibilityTaskRequest.Create(
                            request.CompanyId,
                            request.ResponsibilityId,
                            default(long),
                            string.Empty,
                            string.Empty,
                            (int)request.Frequency,
                            request.StartDate.ToShortDateString(),
                            request.EndDate,
                            request.UserId,
                            request.AssigneeId,
                            (int) TaskStatus.Outstanding,
                            request.StartDate.ToShortDateString(),
                            true,
                            true,
                            true,
                            true,
                            request.TaskGuid,
                            request.SiteId,
                            new List<CreateDocumentRequest>(),
                            request.TaskTemplateId);

            SaveResponsibilityTask(saveResponsibilityTaskRequest);
        }
        public void Setup()
        {
            _companyId = 234246L;
            
            _responsibilityA = new Responsibility { Id = 123L, CompanyId = _companyId };
            _responsibilityB = new Responsibility { Id = 456L, CompanyId = _companyId };

            _responsibilityRepository = new Mock<IResponsibilityRepository>();
            _responsibilityRepository.Setup(x => x.GetByIds(It.IsAny<List<long>>()));
            _responsibilityRepository.Setup(x => x.Save(It.IsAny<Responsibility>()));

            _taskAssignedTo = new Employee { Id = Guid.NewGuid(), CompanyId = _companyId };
            _employeeRepository = new Mock<IEmployeeRepository>();
            _employeeRepository
                .Setup(x => x.GetByIds(It.IsAny<List<Guid>>()))
                .Returns(new List<Employee>() {_taskAssignedTo });

            _site = new Site { Id = 1234L, ClientId = _companyId };
            _siteRepository = new Mock<ISiteRepository>();
            _siteRepository
                .Setup(x => x.GetByIds(It.IsAny<List<long>>()))
                .Returns(new List<Site> { _site });
            
            _statutoryResponsibilityTaskTemplateRepository = new Mock<IStatutoryResponsibilityTaskTemplateRepository>();
            _statutoryResponsibilityTaskTemplateRepository.Setup(x => x.GetById(It.IsAny<long>())).Returns(new StatutoryResponsibilityTaskTemplate());
            
            _creatingUser = new UserForAuditing { Id = Guid.NewGuid() };
            _userForAuditingRepository = new Mock<IUserForAuditingRepository>();
            _userForAuditingRepository
                .Setup(x => x.GetByIdAndCompanyId(_creatingUser.Id, _companyId))
                .Returns(_creatingUser);

            _taskCategory = new TaskCategory()
            {
                Id = 1L
            };

            _taskCategoryRepository = new Mock<ITaskCategoryRepository>();
            _taskCategoryRepository.Setup(x => x.GetResponsibilityTaskCategory())
                .Returns(_taskCategory);

            _documentParameterHelper = new Mock<IDocumentParameterHelper>();
            _log = new Mock<IPeninsulaLog>();

            _taskTemplateA = new StatutoryResponsibilityTaskTemplate { Id = 12345464252L, Title = "task template A title", Description = "task template A description"};
            _taskTemplateB = new StatutoryResponsibilityTaskTemplate { Id = 154764252L, Title = "task template B title", Description = "task template B description" };
            _taskTemplateC = new StatutoryResponsibilityTaskTemplate { Id = 123453252L, Title = "task template C title", Description = "task template C description",  };

            _taskTemplates = new List<StatutoryResponsibilityTaskTemplate> { _taskTemplateA, _taskTemplateB, _taskTemplateC };

            _task1ForResponsibilityA = CreateResponsibilityTasksFromWizardRequest.Create(_companyId, _creatingUser.Id, _site.Id, _responsibilityA.Id, _taskTemplateA.Id,
                                                                            TaskReoccurringType.Weekly, _taskAssignedTo.Id,
                                                                            DateTime.Now.ToShortDateString(),
                                                                            DateTime.Now.AddDays(1).ToShortDateString(),
                                                                            Guid.NewGuid());

            _task2ForResponsibilityA = CreateResponsibilityTasksFromWizardRequest.Create(_companyId, _creatingUser.Id, _site.Id, _responsibilityA.Id, _taskTemplateB.Id,
                                                                            TaskReoccurringType.Weekly, _taskAssignedTo.Id,
                                                                            DateTime.Now.ToShortDateString(),
                                                                            DateTime.Now.AddDays(1).ToShortDateString(),
                                                                            Guid.NewGuid());

            _task1ForResponsibilityB = CreateResponsibilityTasksFromWizardRequest.Create(_companyId, _creatingUser.Id, _site.Id, _responsibilityB.Id, _taskTemplateC.Id,
                                                                            TaskReoccurringType.Weekly, _taskAssignedTo.Id,
                                                                            DateTime.Now.ToShortDateString(),
                                                                            DateTime.Now.AddDays(1).ToShortDateString(),
                                                                            Guid.NewGuid());

            _manyTaskRequest = new CreateManyResponsibilityTaskFromWizardRequest()
            {
                CompanyId = _companyId,
                CreatingUserId = _creatingUser.Id
            };

           
        }