public void TheResultShouldBeAnErrorOnSavingTimesheet() { CreateTimesheet ct = new CreateTimesheet(driver); ct.AssertErrorPage(); driver.Quit(); }
public void TheResultShouldBeAddedToTheListSuccessfully() { CreateTimesheet ct = new CreateTimesheet(driver); ct.AssertDetailsAreCorrect(employeeId, hourlyRate, day, hours, minutes); driver.Quit(); }
public Timesheet CreateTimesheet(CreateTimesheet timesheet) { entity.Timesheet timesheetEntity = mapper.Map <entity.Timesheet>(timesheet); timesheetEntity.Applicant = unitOfWork.EmployeeRepository.GetById(timesheet.UserId); timesheetEntity.Entries.Clear(); foreach (var item in timesheet.Entries) { var entryEntity = mapper.Map <entity.Entry>(item); entryEntity.Project = unitOfWork.ProjectRepository.GetById(item.ProjectId); entryEntity.Task = unitOfWork.TaskRepository.GetById(item.TaskId); timesheetEntity.Entries.Add(entryEntity); } entity.Audit submission = new entity.Audit(); submission.NewStatus = entity.TimesheetStatus.Submitted; submission.Operator = timesheetEntity.Applicant; submission.Timesheet = timesheetEntity; submission.Change = DateTime.Now; timesheetEntity.AuditData = new List <entity.Audit>(); timesheetEntity.AuditData.Add(submission); unitOfWork.TimesheetRepository.Add(timesheetEntity); unitOfWork.Commit(); return(mapper.Map <Timesheet>(timesheetEntity)); }
public Timesheet CreateTimesheet(CreateTimesheet task) { throw new NotImplementedException(); }
public Timesheet CreateTimesheet(CreateTimesheet createTimesheet) { return(businessService.CreateTimesheet(createTimesheet)); }
public void PopulateCreateNewTimesheetPageForDoubleRow() { CreateTimesheet ct = new CreateTimesheet(driver); ct.CreateTestWithMultipleRow(employeeId, hourlyRate, day, hours, minutes); }