コード例 #1
0
        public void TestMethodPatientHasFlueAndDoctorResourceIsOncologistDoctorReturnsFalse()
        {
            var p      = new Patient("A Patient", PatientCondition.Flu);
            var doctor = new Doctor("GP", new[] { DoctorRole.Oncologist });

            var resourceRule = new DoctorResourceRule();

            Assert.IsFalse(resourceRule.IsResourceValid(doctor, p));
        }
コード例 #2
0
        public void TestMethodPatientHasFlueAndDoctorResourceIsBothGeneralPractitionerAndOncologistDoctorReturnsTrue()
        {
            var p      = new Patient("A Patient", PatientCondition.Flu);
            var doctor = new Doctor("GP", new[] { DoctorRole.GeneralPractitioner, DoctorRole.Oncologist });

            var resourceRule = new DoctorResourceRule();

            Assert.IsTrue(resourceRule.IsResourceValid(doctor, p));
        }
コード例 #3
0
        public void TestMethodPatientHasBreastCancerAndDoctorResourceIsGeneralPractitionerDoctorReturnsFalse()
        {
            var p      = new Patient("A Patient", PatientCondition.Cancer, ConditionTopography.Breast);
            var doctor = new Doctor("GP", new[] { DoctorRole.GeneralPractitioner });

            var resourceRule = new DoctorResourceRule();

            Assert.IsFalse(resourceRule.IsResourceValid(doctor, p));
        }