Ejemplo n.º 1
0
        public void GetDealItemsOfDeal_SelectedRandomDeal_ShouldContainsItem()
        {
            //init
            var dealsResult = dealController.Deals(1, int.MaxValue).GetObject <PagedResult <Deal> >().Queryable.ToArray();
            var dealsArb    = ControllerHelper.ChooseFrom(dealsResult).ToArbitrary();

            Prop.ForAll(dealsArb, (deal) =>
            {
                //execution
                var result = sut.GetDealItemsOfDeal(deal.Id).GetObject <IEnumerable <DealItem> >();

                //assertion
                Assert.IsNotEmpty(result);
            }).QuickCheckThrowOnFailure();
        }