public void IsChangePasswordWihtWorngEmailIdPasswordShouldNotToChange() { PendingPasswordChangeRequest ppObj = new PendingPasswordChangeRequest(); ppObj.Email = "*****@*****.**"; // arrange FakeAPI objFakeAPI = new FakeAPI(); // act bool isLogin = objFakeAPI.IsChangeRequestEmailExists(ppObj.Email); Assert.IsFalse(isLogin); if (isLogin != false) { // password change UserProfile upObj = new UserProfile(); upObj.email = "*****@*****.**"; upObj.password = "******"; bool result = objFakeAPI.SetNewPasswordByEmailId(upObj.email, upObj.password); // assert Assert.IsTrue(result); } }
public EmployeeModel(string LocationCode, string EmployeeID, DateTime[] NextWeekDates) { //ListOfEmployees = FakeAPI.GetAllEmployees(); EmployeeNotifications = FakeAPI.GetMessagesForEmployee(EmployeeID); EmployeeSchedule = FakeAPI.GetEmployeeSchedule(EmployeeID, NextWeekDates); }
public LaborScheduling(string LocationCode) { //EmployeeListAll = FakeAPI.GetAllEmployees(); //EmployeeListStore = FakeAPI.GetEmployeesForStore(storeCode); ManagerMessageList = FakeAPI.GetMessagesForManager(LocationCode); ThisWeek = new WorkWeek(); /// <summary> /// A horizontal table to display the amount of employees needed for each hour of a selected day /// </summary> DataTable AssignmentTable = new DataTable(); }
public void IsEmailExists() { UserProfile upObj = new UserProfile(); upObj.email = "*****@*****.**"; // arrange FakeAPI objFakeAPI = new FakeAPI(); // act bool isLogin = objFakeAPI.IsEmailExists(upObj.email); // assert Assert.IsTrue(isLogin); }
public void CheckUserNotToLoginWithWrongCredential() { UserProfile upObj = new UserProfile(); upObj.email = "*****@*****.**"; upObj.password = "******"; // arrange FakeAPI objFakeAPI = new FakeAPI(); // act bool isLogin = objFakeAPI.IsValidUser(upObj.email, upObj.password); // assert Assert.IsFalse(isLogin); }
public void IsLoginWithCorrectCredential() { UserProfile upObj = new UserProfile(); upObj.email = "*****@*****.**"; upObj.password = "******"; // arrange FakeAPI objFakeAPI = new FakeAPI(); // act bool isLogin = objFakeAPI.IsValidUser(upObj.email, upObj.password); // assert Assert.IsTrue(isLogin); }
public AvailabilityViewModel(string LocationCode) { //get the employees for the store EmployeeList = FakeAPI.GetEmployeesForStore(LocationCode); // set of employee ids and names EmpsForStore = new Dictionary <string, string>(); // set of employee ids and their schedules EmpAvailabilityTable = new Dictionary <string, DataTable>(); EmpsForStore.Add("--", "--"); for (int i = 0; i < EmployeeList.Count; i++) { EmpsForStore.Add(EmployeeList[i].id, EmployeeList[i].firstName + " " + EmployeeList[i].lastName); EmpAvailabilityTable.Add(EmployeeList[i].id, FakeAPI.GetEmployeeAvailability(EmployeeList[i].id)); } empList = new SelectList(EmpsForStore, "Name", "Id"); }
public void UpdateSchedule(AvailabilityViewModel avm, string[] schedule, string employeeId, DateTime[] NextFourWeeksDates, string StoreCode) { List <string> updatedSchedule = new List <string>(); string s = schedule[0]; // split the single element array into an element for each cell string[] values = s.Split(','); // remove whitespace for (int i = 0; i < values.Length; i++) { values[i] = values[i].Trim(); } // remove timecells form the array and add the updated array to a list for (int i = 0; i < values.Length; i++) { if (values[i] == "True" || values[i] == "False") { updatedSchedule.Add(values[i]); } } FakeAPI.UpdateEmployeeAvailability(avm, updatedSchedule, employeeId, NextFourWeeksDates, StoreCode); }
/// <summary> /// Get an employee's messages to display on their home page /// </summary> /// <param name="EmployeeID"></param> public void getMessages(string EmployeeID) { EmployeeNotifications = FakeAPI.GetMessagesForEmployee(EmployeeID); }
/// <summary> /// Submit a time off request from an employee's home page /// </summary> /// <param name="created"></param> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <param name="Name"></param> /// <param name="Id"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <param name="message"></param> public void submitTimeOffRequest(string created, string startDate, string endDate, string Name, string Id, string LocationCode, string startTime, string endTime, string message) { FakeAPI.SubmitTimeOffRequest(created, startDate, endDate, Name, Id, LocationCode, startTime, endTime, message); }