Beispiel #1
0
        public void Test_for_SearchAppoinment()
        {
            Staff staff = new Staff()
            {
                StaffId = 1
            };

            Appointment appointment = new Appointment()
            {
                AppointmentDate = DateTime.Now
            };

            var result        = _Nurseservices.SearchAppoinment(staff.StaffId, appointment.AppointmentDate);
            var GetAppoinment = _Nurseservices.GetAppointment(staff.StaffId, appointment.AppointmentDate);

            Assert.Equal(GetAppoinment, result);
        }
Beispiel #2
0
        public void ExceptionTestFor_SearchAppoinmentNotFound()
        {
            Staff staff = new Staff()
            {
                StaffId = 1
            };

            Appointment appointment = new Appointment()
            {
                AppointmentDate = DateTime.Now
            };


            //Assert
            var ex = Assert.Throws <SearchAppoinmentException>(() => _Nurseservices.SearchAppoinment(staff.StaffId, appointment.AppointmentDate));

            Assert.Equal("Appoinment Not Found ", ex.Messages);
        }