public void TestAdd()
        {
            Dictionary <string, object> dataJSON = new Dictionary <string, object>();

            Product[] products = new Product[] {
                new Product(dataJSON),
                new Product(dataJSON),
                new Product(dataJSON)
            };

            _productCache.Add(products, "afterafterafter");

            Assert.AreEqual(_productCache.Cursor, "afterafterafter");
            Assert.AreEqual(_productCache.Complete, false);
            Assert.AreEqual(_productCache.Count, 3);
        }
Esempio n. 2
0
        void IMultiProductShop.OnProductsLoaded(Product[] products, string after)
        {
            if (_productCache.Complete)
            {
                return;
            }

            _productCache.Add(products, after);
            _productListView.OnProductsLoaded(products);
        }