public void getBillHistoryByUserId() { string userName = "******"; List <Bill> bills = ServicesTestConstant.getBills(); _billRepository.Setup(b => b.FindAllByUserNameAndIsDeliveryPaidTrue(userName)).Returns(bills); List <BillModel> result = _billService.GetBillHistoryByUserName(userName); _billRepository.Verify(place => place.FindAllByUserNameAndIsDeliveryPaidTrue(It.IsAny <string>()), Times.Once()); Assert.AreEqual(ServicesTestConstant.getBillDto(), result[0]); Assert.AreEqual(bills.Count, result.Count); }