Ejemplo n.º 1
0
        public void getBillsToPayByUserId()
        {
            BillInfoToPayModel billInfoToPayDto = ServicesTestConstant.getBillInfoToPayDto();
            Bill bill = ServicesTestConstant.getBill();

            billInfoToPayDto.LocalityGetName  = bill.Delivery.Way.LocalityGet.NameEn;
            billInfoToPayDto.LocalitySandName = bill.Delivery.Way.LocalitySand.NameEn;

            List <BillInfoToPayModel> result = _billService.GetBillsToPayByUserName(ServicesTestConstant.getUserId());

            _billRepository.Verify(place => place.FindAllByUserIdAndIsDeliveryPaidFalse
                                       (ServicesTestConstant.getUserId()), Times.Once());
            Assert.AreEqual(ServicesTestConstant.getBills().Count, result.Count);
            Assert.AreEqual(billInfoToPayDto, result[0]);
        }