public void GetEmployees_Validated() { one.EmployeesAvailableAndTrained.Clear(); UpdateJobDetailsCorrectly(); String jobSelected = ls[new Random().Next(0, 5)]; CollectionAssert.AllItemsAreNotNull(one.EmployeesAvailableAndTrained); one.Getemployees(jobSelected); CollectionAssert.AllItemsAreNotNull(one.EmployeesAvailableAndTrained); Assert.AreEqual("John Knight", one.EmployeesAvailableAndTrained[1579]); }
private void jobsComboBox_SelectedIndexChanged(object sender, EventArgs e)//Show available employees for selected Job. { AvlbleEmplsComboBox.ResetText(); startShiftButton.Enabled = false; employer.EmployeesAvailableAndTrained.Clear(); AvlbleEmplsComboBox.Items.Clear(); employer.Getemployees(jobsComboBox.SelectedItem.ToString()); foreach (KeyValuePair <int, string> emp in employer.EmployeesAvailableAndTrained) { AvlbleEmplsComboBox.Items.Add(emp.Key + "," + emp.Value); } AvlbleEmplsComboBox.Enabled = true; NoOfShiftsNumericUpDown.Enabled = true; }