public void BillOfExchangeRepository_Get()
        {
            BillOfExchangeRepository sut = new BillOfExchangeRepository();

            BillOfExchange[] result1 = sut.Get(10, 0).ToArray();
            BillOfExchange[] result2 = sut.Get(10, 5).ToArray();

            CollectionAssert.AreEqual(result1.Skip(5).Take(5), result2.Take(5));
        }
        public List <BillOfExchangeListDto> GetList(int take, int skip)
        {
            var list = BillOfExchangeRepository.Get(take, skip).ToList();
            Dictionary <int, string> names = GetPartiesDictionary(GetPartiesIds(list));

            return(list.ConvertAll(b => new BillOfExchangeListDto(b.Id, b.DrawerId, names[b.DrawerId], b.BeneficiaryId, names[b.BeneficiaryId], b.Amount)));
        }
示例#3
0
        public void GetEndorsementTest()
        {
            var bills = _billOfExchangeRepository.Get(1000, 0);

            foreach (var b in bills)
            {
                _endorsementService.GetEndorsements(b.Id);
            }
        }