Exemple #1
0
        public void IndexPageFailAllegroLinkNoCategoryWithPagination()
        {
            using IBaseOfferListController ctr = new HttpAllegroOfferListController();
            Assert.Throws <OfferListControllerException>(
                () => ctr.StartFetching(false,
                                        new OfferCategory(EOfferWebsite.Allegro, "uzytkownik/KOLEKCJONER-PL--/oceny")));
            OfferListControllerException ex =
                Assert.Throws <OfferListControllerException>(() => ctr.GetCurrentPageIndex());

            Assert.That(ex, Is.Not.Null);
            ctr.Dispose();
            controller.Dispose();
        }
Exemple #2
0
        public void IndexPageFailAllegroLink()
        {
            using IBaseOfferListController ctr = new HttpAllegroOfferListController();

            OfferListControllerException e =
                Assert.Throws <OfferListControllerException>(
                    () => ctr.StartFetching(false, new OfferCategory(EOfferWebsite.Allegro, "/testfaillink")));
            OfferListControllerException ex =
                Assert.Throws <OfferListControllerException>(() => ctr.GetCurrentPageIndex());

            Assert.That(e, Is.Not.Null);
            Assert.That(ex, Is.Not.Null);
            ctr.Dispose();
            controller.Dispose();
        }