Beispiel #1
0
        public void TheResultShouldBeAnErrorOnSavingTimesheet()
        {
            CreateTimesheet ct = new CreateTimesheet(driver);

            ct.AssertErrorPage();
            driver.Quit();
        }
Beispiel #2
0
        public void TheResultShouldBeAddedToTheListSuccessfully()
        {
            CreateTimesheet ct = new CreateTimesheet(driver);

            ct.AssertDetailsAreCorrect(employeeId, hourlyRate, day, hours, minutes);


            driver.Quit();
        }
Beispiel #3
0
 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));
 }
Beispiel #4
0
 public Timesheet CreateTimesheet(CreateTimesheet task)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public Timesheet CreateTimesheet(CreateTimesheet createTimesheet)
 {
     return(businessService.CreateTimesheet(createTimesheet));
 }
Beispiel #6
0
        public void PopulateCreateNewTimesheetPageForDoubleRow()
        {
            CreateTimesheet ct = new CreateTimesheet(driver);

            ct.CreateTestWithMultipleRow(employeeId, hourlyRate, day, hours, minutes);
        }