public void AmountOfPatientsInPriorityQueue_DontReturnNIException()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();
            int test;

            Assert.DoesNotThrow(() => test = emergencyCentral.AmountOfPatientsInPriorityQueue());
        }
        public void ElevateCallToDoctor_DoesNotThrow()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.DoesNotThrow(() => emergencyCentral.ElevateCallToDoctor(patient));
        }
        public void QueueNumberForCallFromEmployee_PatientMustBeOnPatientsQueue()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.False(emergencyCentral.QueueNumberForCallFromEmployee(patient));
        }
        public void PriorityCall_DoesNotThrow()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.DoesNotThrow(() => emergencyCentral.PriorityCall(patient));
        }
        public void PriorityCall_ReturnsTrue()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.True(emergencyCentral.PriorityCall(patient));
        }
        public void QueueNumber_DontThrow()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.DoesNotThrow(() => emergencyCentral.QueueNumber(patient));
        }
        public void QueueNumber_ReturnsTrue()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.True(emergencyCentral.QueueNumber(patient));
        }
        public void ElevateCallToDoctor_CallElevatedToDoctor()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.True(emergencyCentral.ElevateCallToDoctor(patient));
        }
        public void QueueNumberForCallFromEmployee_DoesNotThrow()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            Assert.DoesNotThrow(() => emergencyCentral.QueueNumberForCallFromEmployee(patient));
        }
        public void PriorityCall_AddsPatientToQueue()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            emergencyCentral.PriorityCall(patient);

            Assert.AreEqual(1, emergencyCentral.AmountOfPatientsInPriorityQueue());
        }
        public void QueueNumber_AddsPatientToQueue()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            emergencyCentral.QueueNumber(patient);

            Assert.AreEqual(1, emergencyCentral.AmountOfPatientsInQueue());
        }
        public void PriorityCall_ReturnsFalseIfPatientExists()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            emergencyCentral.PriorityCall(patient);

            Assert.AreEqual(1, emergencyCentral.AmountOfPatientsInPriorityQueue());

            Assert.False(emergencyCentral.PriorityCall(patient));
        }
        public void QueueNumber_ReturnsFalseIfPatientExists()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient patient = new Patient(0, 123456789);

            emergencyCentral.QueueNumber(patient);

            Assert.AreEqual(1, emergencyCentral.AmountOfPatientsInQueue());

            Assert.False(emergencyCentral.QueueNumber(patient));
        }
Exemplo n.º 14
0
        public void GetDoctorCall_GetsPatientAwaiting()
        {
            IEmployeeManagement emergencyCentral = new EmergencyCentral();

            IPatient expected = new Patient(0, 84653515);

            // Casting here to use the Interface as a guide to send the request in.(Also guarentees that EmergencyCentral is of type IEmergencyCentral)
            ((IEmergencyCentral)emergencyCentral).ElevateCallToDoctor(expected);

            IPatient actual = emergencyCentral.GetDoctorCall();

            Assert.AreEqual(expected.TimeRequiredSeconds, actual.TimeRequiredSeconds);
            Assert.AreEqual(expected.PhoneNumber, actual.PhoneNumber);
        }
Exemplo n.º 15
0
        public void GetHighestPrioityCall_ReturnsHighPriorityCall()
        {
            EmergencyCentral emergencyCentral = new EmergencyCentral();

            IPatient expected = new Patient(0, 84653515);

            // Casting here to use the Interface as a guide to send the request in.(Also guarentees that EmergencyCentral is of type IEmergencyCentral)
            ((IEmergencyCentral)emergencyCentral).PriorityCall(expected);

            IPatient actual = ((IEmployeeManagement)emergencyCentral).GetHighestPrioityCall();

            Assert.AreEqual(expected.TimeRequiredSeconds, actual.TimeRequiredSeconds);
            Assert.AreEqual(expected.PhoneNumber, actual.PhoneNumber);
        }
Exemplo n.º 16
0
        public void GetHighestPrioityCall_ReturnsNullOnEmptyList()
        {
            IEmployeeManagement emergencyCentral = new EmergencyCentral();

            Assert.Null(emergencyCentral.GetHighestPrioityCall());
        }
Exemplo n.º 17
0
        public void GetDoctorCall_DoesNotThrow()
        {
            IEmployeeManagement emergencyCentral = new EmergencyCentral();

            Assert.DoesNotThrow(() => emergencyCentral.GetDoctorCall());
        }
        public void AmountOfPatientsInPriorityQueue_ReturnsZero()
        {
            IEmergencyCentral emergencyCentral = new EmergencyCentral();

            Assert.AreEqual(0, emergencyCentral.AmountOfPatientsInPriorityQueue());
        }
Exemplo n.º 19
0
        public void GetHighestPrioityCall_DoesNotThrow()
        {
            IEmployeeManagement emergencyCentral = new EmergencyCentral();

            Assert.DoesNotThrow(() => emergencyCentral.GetHighestPrioityCall());
        }