public void CanNewStaffBeAdded()
        {
            // Arrange
            var facadeInstance = new HealthFacade();

            //Act

            // Result should be false because the Category of the staff member does not exists
            Boolean result        = facadeInstance.addStaff(11, "Davide", "Pollicino", "Somewhere 2", "in Edinburgh", "Fake category", 3.564, 51.678);
            Boolean valueExpected = false;

            //Assert

            Assert.AreEqual(result, valueExpected);
        }
Example #2
0
        private void btnAddStaff_Click(object sender, RoutedEventArgs e)
        {
            txtOutput.Text = "";
            if (!healthSystem.addStaff(1, "James", "Henry", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(2, "Sally", "Wilson", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(3, "Roland", "Smith", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(4, "Mary", "Jones", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(5, "Phillip", "Jones", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(6, "Martha", "Rigg", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(7, "Mike", "Heathcoat", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            if (!healthSystem.addStaff(8, "Jo", "Shaw", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164))
            {
                txtOutput.Text += " Staff member not added \n";
            }

            txtOutput.Text += healthSystem.getStaffList() + "\n";
        }
Example #3
0
 private void btnAddStaff_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         healthSystem.addStaff(1, "James", "Henry", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164);
         healthSystem.addStaff(2, "Sally", "Wilson", "21 Accia Road", "Edinburgh", "General Practitioner", 55.932221, -3.214164);
         healthSystem.addStaff(3, "Roland", "Smith", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164);
         healthSystem.addStaff(4, "Mary", "Jones", "21 Accia Road", "Edinburgh", "Social Worker", 55.932221, -3.214164);
         healthSystem.addStaff(5, "Phillip", "Jones", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164);
         healthSystem.addStaff(6, "Martha", "Rigg", "21 Accia Road", "Edinburgh", "Community Nurse", 55.932221, -3.214164);
         healthSystem.addStaff(7, "Mike", "Heathcoat", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164);
         healthSystem.addStaff(8, "Jo", "Shaw", "21 Accia Road", "Edinburgh", "Care Worker", 55.932221, -3.214164);
         dgv1.ItemsSource = healthSystem.getStaffList();
     }
     catch (Exception ex)
     {
         throw;
     }
 }