Пример #1
0
        public void GetAnalysis()
        {
            int shopId            = 19120225;
            InventoryAnalytics ia = new InventoryAnalytics(this.syncDatabase, this.etsyAPI);

            InventoryStatus invStatus = ia.GetInventoryStatus(shopId);

            Assert.True(invStatus.Added.Count > 0);
        }
Пример #2
0
        public void GetAnalysisForMultiple()
        {
            if (Directory.Exists(this.rootDir))
            {
                Directory.Delete(this.rootDir, true);
                Directory.CreateDirectory(this.rootDir);
            }

            List <int> shopIds = fillTestShops().Values.ToList();

            InventoryAnalytics     ia        = new InventoryAnalytics(this.syncDatabase, this.etsyAPI);
            List <InventoryStatus> invStatus = ia.GetInventoryStatus(shopIds);

            bool res = invStatus.All((status) =>
            {
                return(status.Added.Count > 0);
            });

            Assert.True(res);
        }
Пример #3
0
        public List <InventoryStatus> Post([FromBody] List <int> shopIDs)
        {
            List <InventoryStatus> stats = ia.GetInventoryStatus(shopIDs);

            return(stats);
        }