示例#1
0
        public void Find_Prescriptions_With_Empty_Search()
        {
            PrescriptionService service = new PrescriptionService(CreateStubRepository());

            List <Prescription> foundPrescriptions = service.AdvancedSearchPrescriptions(new PrescriptionAdvancedSearchDto("", "", new string[] { }, new string[] { }, new string[] { }));

            foundPrescriptions.ShouldNotBeEmpty();
        }
示例#2
0
        public void Find_No_Matching_Prescriptions()
        {
            PrescriptionService service = new PrescriptionService(CreateStubRepository());

            List <Prescription> foundPrescriptions = service.AdvancedSearchPrescriptions(new PrescriptionAdvancedSearchDto("medicines", "Medicine Name23", new string[] { }, new string[] { }, new string[] { }));

            foundPrescriptions.ShouldBeEmpty();
        }
示例#3
0
        public void Find_Prescriptions()
        {
            PrescriptionService service = new PrescriptionService(CreateStubRepository());

            List <Prescription> foundPrescriptions = service.AdvancedSearchPrescriptions(new PrescriptionAdvancedSearchDto("medicines", "Medicine Name", new string[] { }, new string[] { }, new string[] { }));

            foundPrescriptions.ShouldHaveSingleItem();
        }
示例#4
0
        public void Find_No_Prescriptions_AND()
        {
            PrescriptionService service = new PrescriptionService(CreateStubRepository());

            List <Prescription> foundPrescriptions = service.AdvancedSearchPrescriptions(new PrescriptionAdvancedSearchDto("medicines", "Medicine Name", new string[1] {
                "comment"
            }, new string[1] {
                "Comment23"
            }, new string[1] {
                "and"
            }));

            foundPrescriptions.ShouldBeEmpty();
        }