public void Find_specific_prescription() { PrepareStubs(); var prescriptionService = new MedicationPrescriptionService ( _prescriptionStubRepository.Object, _mockDiagnosisConnection.Object ); IEnumerable <MedicationPrescription> matchedPrescriptions = prescriptionService.SimpleSearch("Brufen"); Assert.Equal("Brufen", matchedPrescriptions.ToList()[0].Medication.Name); }
public void Find_no_prescription() { PrepareStubs(); var prescriptionService = new MedicationPrescriptionService ( _prescriptionStubRepository.Object, _mockDiagnosisConnection.Object ); IEnumerable <MedicationPrescription> matchedPrescriptions = prescriptionService.SimpleSearch("xxx"); Assert.Empty(matchedPrescriptions); }
public void Find_all_prescription() { PrepareStubs(); var prescriptionService = new MedicationPrescriptionService ( _prescriptionStubRepository.Object, _mockDiagnosisConnection.Object ); IEnumerable <MedicationPrescription> matchedPrescriptions = prescriptionService.SimpleSearch("Br"); Assert.All(matchedPrescriptions, prescription => Assert.Contains("Br", prescription.Medication.Name)); }