public void GetEtsyShops()
        {
            int[] shopIds = new int[] { testShops["A"], testShops["B"] };

            EtsyAPIProxy ec            = this.etsyAPI;
            List <Shop>  requestedShop = ec.GetShops(shopIds, 100, 0).Results;

            Assert.Equal(2, requestedShop.Count);
        }
Beispiel #2
0
        public void PersistInventory()
        {
            int shopId = 19099945;

            EtsyAPIProxy ec = this.etsyAPI;

            List <Shop> requestedShops = ec.GetShops(new int[] { shopId }, 100, 0).Results;
            Shop        shop           = requestedShops[0];


            List <Listing> reqListing   = ec.GetActiveListingsByShop(shopId, 100, 0).Results;
            int            listingCount = reqListing.Count;

            this.syncDatabase.PersistShopInventory(shop, reqListing);


            List <ShopInventory> shopInventorys = this.syncDatabase.ReadShopInventory(new int[] { shopId });
            int persistedListingCount           = shopInventorys[0].Listings.Count;


            Assert.Equal(listingCount, persistedListingCount);
        }