public void GetEmployeesQualificationsUnderACompany() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.USERID, Constants.COMPANY_ID, Constants.SUSPENDED_QUALIFICATION, Constants.DISQUALIFIED_QUALIFICATION, Constants.ROLE, Constants.EMPLOYEE_NAME, Constants.TOTAL_EMPLOYEES, Constants.ASSIGNED_QUALIFICATION, Constants.COMPLETED_QUALIFICATION, Constants.IN_DUE_QUALIFICATION, Constants.PAST_DUE_QUALIFICATION, Constants.IN_COMPLETE_QUALIFICATION, Constants.LOCK_OUT_COUNT }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.CONTRACTOR_COMPANY, "4065", "=", ""); tasksList.Add(taskFilter1); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; Assert.IsTrue(tasksResponse.Count > 0); Assert.AreNotEqual("", tasksResponse[0].UserId); Assert.AreNotEqual(null, tasksResponse[0].LockoutCount); }
public void GetDashboardForAUser() { List <EmployeeModel> wbList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.USERID, Constants.SUPERVISOR_ID, Constants.EMPLOYEE_NAME, Constants.ROLE, Constants.ASSIGNED_WORKBOOK, Constants.WORKBOOK_DUE, Constants.PAST_DUE_WORKBOOK, Constants.COMPLETED_WORKBOOK, Constants.TOTAL_EMPLOYEES }; EmployeeModel wbFilter1 = testExecute.CreateFields(Constants.SUPERVISOR_ID, "331535", "=", ""); EmployeeModel wbFilter2 = testExecute.CreateFields(Constants.CURRENT_USER, "331535", "=", "AND"); wbList.Add(wbFilter1); wbList.Add(wbFilter2); WorkbookResponse wbResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.WORKBOOK_DASHBOARD, wbList); List <WorkbookModel> workbookList = wbResponse.Workbooks; Assert.IsTrue(workbookList.Count > 0); }
public void GetTasksProgressForAWorkbook() { List <EmployeeModel> wbList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.USERID, Constants.WORKBOOK_ID, Constants.TASK_ID, Constants.TASK_CODE, Constants.TASK_NAME, Constants.COMPLETED_TASK, Constants.INCOMPLETE_TASK, Constants.TOTAL_TASK }; EmployeeModel wbFilter1 = testExecute.CreateFields(Constants.USERID, "384666", "=", ""); EmployeeModel wbFilter2 = testExecute.CreateFields(Constants.WORKBOOK_ID, "22", "=", "AND"); wbList.Add(wbFilter1); wbList.Add(wbFilter2); WorkbookResponse wbResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.WORKBOOK_DASHBOARD, wbList); List <WorkbookModel> workbookList = wbResponse.Workbooks; Assert.IsTrue(workbookList.Count > 0); }
public void GetLockOutForACompanyWithoutLockOutData() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.TASK_CODE, Constants.TASK_NAME, Constants.EMPLOYEE_NAME, Constants.COURSE_EXPIRATION_DATE, "REASON" }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.CONTRACTOR_COMPANY, "4738", "=", ""); EmployeeModel taskFilter2 = testExecute.CreateFields(Constants.LOCKOUT_COUNT, "true", "=", "AND"); tasksList.Add(taskFilter1); tasksList.Add(taskFilter2); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; Assert.IsTrue(tasksResponse.Count == 0); }
public void GetInDueQualificationsForACompany() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.TASK_CODE, Constants.TASK_NAME, Constants.EMPLOYEE_NAME, Constants.COURSE_EXPIRATION_DATE, "REASON" }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.CONTRACTOR_COMPANY, "4065", "=", ""); EmployeeModel taskFilter2 = testExecute.CreateFields(Constants.IN_DUE, "30", "=", "AND"); tasksList.Add(taskFilter1); tasksList.Add(taskFilter2); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; Assert.IsTrue(tasksResponse.Count > 0); Assert.AreNotEqual(null, tasksResponse[0].ExpirationDate); }
public void GetQualifiedForACompany() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.TASK_CODE, Constants.TASK_NAME, Constants.EMPLOYEE_NAME, Constants.COURSE_EXPIRATION_DATE, "REASON" }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.CONTRACTOR_COMPANY, "4065", "=", ""); EmployeeModel taskFilter2 = testExecute.CreateFields(Constants.COMPLETED, "true", "=", "AND"); tasksList.Add(taskFilter1); tasksList.Add(taskFilter2); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; Assert.IsTrue(tasksResponse.Count > 0); Assert.AreNotEqual("", tasksResponse[0].UserId); Assert.AreEqual(Constants.QUALIFIED, tasksResponse[0].Status.ToUpper()); }
public void GetOQDashboardForAUser() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.COMPANY_ID, Constants.COMPANY_NAME, Constants.SUSPENDED_QUALIFICATION, Constants.DISQUALIFIED_QUALIFICATION, Constants.ASSIGNED_COMPANY_QUALIFICATION, Constants.COMPLETED_COMPANY_QUALIFICATION, Constants.IN_COMPLETE_COMPANY_QUALIFICATION, Constants.PAST_DUE_COMPANY_QUALIFICATION, Constants.IN_DUE_COMPANY_QUALIFICATION, Constants.TOTAL_COMPANY_EMPLOYEES, Constants.LOCK_OUT_COUNT }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.USERID, "331535", "=", ""); tasksList.Add(taskFilter1); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; //int userIndex = tasksResponse.FindIndex(x => x.UserId.ToString() == supervisor_company_id); //Assert.IsTrue(userIndex >= 0); Assert.IsTrue(tasksResponse.Count > 0); Assert.AreNotEqual("", tasksResponse[0].CompanyName); Assert.AreNotEqual(null, tasksResponse[0].LockoutCount); Assert.IsTrue(tasksResponse[0].TotalEmployees >= 0); }
public void RepititionsDetailForUnattemptedTask() { List <EmployeeModel> wbList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.NUMBER_OF_ATTEMPTS, Constants.STATUS, Constants.LAST_ATTEMPT_DATE, Constants.LOCATION, Constants.EVALUATOR_NAME, Constants.COMMENTS }; EmployeeModel wbFilter1 = testExecute.CreateFields(Constants.USERID, "384666", "=", ""); EmployeeModel wbFilter2 = testExecute.CreateFields(Constants.STATUS, Constants.COMPLETED, "=", "AND"); EmployeeModel wbFilter4 = testExecute.CreateFields(Constants.WORKBOOK_ID, "22", "=", "AND"); EmployeeModel wbFilter3 = testExecute.CreateFields(Constants.TASK_ID, "32934", "=", "AND"); wbList.Add(wbFilter1); wbList.Add(wbFilter2); wbList.Add(wbFilter3); wbList.Add(wbFilter4); WorkbookResponse wbResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.WORKBOOK_DASHBOARD, wbList); List <WorkbookModel> workbookList = wbResponse.Workbooks; Assert.IsTrue(workbookList.Count == 0); }
public void GetAllQualificationsForASupervisor() { List <EmployeeModel> tasksList = new List <EmployeeModel>(); TestExecution testExecute = new TestExecution(); string[] ColumnList = new string[] { Constants.TASK_CODE, Constants.TASK_NAME, Constants.EMPLOYEE_NAME, Constants.ASSIGNED_DATE, "REASON" }; EmployeeModel taskFilter1 = testExecute.CreateFields(Constants.CONTRACTOR_COMPANY, "4065", "=", ""); EmployeeModel taskFilter2 = testExecute.CreateFields(Constants.ADMIN_ID, "331535", "=", "AND"); EmployeeModel taskFilter3 = testExecute.CreateFields(Constants.SUPERVISOR_ID, "370043", "=", ""); EmployeeModel taskFilter4 = testExecute.CreateFields(Constants.ASSIGNED, "true", "=", "AND"); tasksList.Add(taskFilter1); tasksList.Add(taskFilter2); tasksList.Add(taskFilter3); tasksList.Add(taskFilter4); TaskResponse taskResponse = testExecute.ExecuteTests(2288, 331535, ColumnList, Constants.OQ_DASHBOARD, tasksList); List <TaskModel> tasksResponse = taskResponse.Tasks; Assert.IsTrue(tasksResponse.Count > 0); Assert.AreEqual(370043, tasksResponse[0].UserId); }