Exemplo n.º 1
0
        public async Task MedicineSupply_ServiceLayer_ValidInput_Pass()
        {
            MedicineSupplyService         supplyService     = new MedicineSupplyService(supplyRepo.Object);
            List <PharmacyMedicineSupply> serviceSupplyList = await supplyService.MedcineSupply(medicineDemand.Medicine, medicineDemand.Demand);

            Assert.AreEqual(2, serviceSupplyList.Count);
        }
Exemplo n.º 2
0
        public async Task MedicineSupply_ServiceLayer_InValidDemandCount_NullOutput()
        {
            MedicineDemand demandOfSupplier = new MedicineDemand()
            {
                Medicine = "Aspirin",
                Demand   = 0
            };
            MedicineSupplyService         supplyService     = new MedicineSupplyService(supplyRepo.Object);
            List <PharmacyMedicineSupply> serviceSupplyList = await supplyService.MedcineSupply(demandOfSupplier.Medicine, demandOfSupplier.Demand);

            Assert.IsNull(serviceSupplyList);
        }