Ejemplo n.º 1
0
        public void Should_Send_PriceListing()
        {
            // Arrange
            EisInventoryContext _context = new EisInventoryContext();
            var bcOrderInventoryProvider = new BigCommerceMarketplaceInventoryProvider();

            bcOrderInventoryProvider.Credential = _credential;

            var eisSKU          = "";
            var productListFeed = new List <MarketplacePriceFeedDto>();
            var product         = _context.products.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productBC       = _context.productbigcommerces.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productFeed     = new MarketplacePriceFeedDto()
            {
                EisSKU = product.EisSKU
            };

            productFeed.BigCommerceProductFeed = new BigCommerceProductFeed()
            {
                EisSKU    = productBC.EisSKU,
                ProductId = productBC.ProductId,
                FixedCostShippingPrice = productBC.FixedCostShippingPrice,
                Price       = productBC.Price,
                RetailPrice = productBC.RetailPrice
            };

            productListFeed.Add(productFeed);

            // Act
            bcOrderInventoryProvider.SubmitProductPriceFeeds(productListFeed, "Test");


            // Assert
        }
Ejemplo n.º 2
0
        public void Shoud_Get_CategoryList()
        {
            // Arrange
            var bcOrderInventoryProvider = new BigCommerceMarketplaceInventoryProvider();

            bcOrderInventoryProvider.Credential = _credential;

            // Act
            var result = bcOrderInventoryProvider.GetCategoryList();

            // Assert
            Assert.True(result.Count > 0);
        }
Ejemplo n.º 3
0
        public void Should_Delete_Single_BigCommerce_Product()
        {
            // Arrange
            var bcInventoryprovider = new BigCommerceMarketplaceInventoryProvider();

            bcInventoryprovider.Credential = _credential;
            var marketPlaceEndItemFeed = new ItemFeed();

            // Act
            marketPlaceEndItemFeed.EisSKU = "";
            marketPlaceEndItemFeed.ItemId = "";

            bcInventoryprovider.SubmitSingleProductEndItem(marketPlaceEndItemFeed, "UnitTest");


            // Assert
        }
Ejemplo n.º 4
0
        public void Should_Send_ReviseListing()
        {
            // Arrange
            EisInventoryContext _context = new EisInventoryContext();
            var bcOrderInventoryProvider = new BigCommerceMarketplaceInventoryProvider();

            bcOrderInventoryProvider.Credential = _credential;

            var eisSKU          = "";
            var productListFeed = new List <MarketplaceProductFeedDto>();
            var product         = _context.products.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productBC       = _context.productbigcommerces.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productFeed     = new MarketplaceProductFeedDto()
            {
                EisSKU      = product.EisSKU,
                Name        = product.Name,
                ItemWidth   = product.ItemWidth,
                ItemHeight  = product.ItemHeight,
                Description = product.Description,
                UPC         = product.UPC
            };

            productFeed.BigCommerceProductFeed = new BigCommerceProductFeed()
            {
                EisSKU       = productBC.EisSKU,
                Price        = productBC.Price,
                ProductsType = productBC.ProductsType.Value,
                Condition    = productBC.Condition,
                Categories   = productBC.Categories,
                CategoryId   = productBC.CategoryId,
                ProductId    = productBC.ProductId,
                Brand        = productBC.Brand
            };

            productListFeed.Add(productFeed);

            // Act
            bcOrderInventoryProvider.SubmitProductsReviseFeed(productListFeed, "Test");


            // Assert
        }
Ejemplo n.º 5
0
        public void Should_Send_InventoryListing()
        {
            // Arrange
            EisInventoryContext _context = new EisInventoryContext();
            var bcOrderInventoryProvider = new BigCommerceMarketplaceInventoryProvider();

            bcOrderInventoryProvider.Credential = _credential;

            var eisSKU          = "";
            var productListFeed = new List <MarketplaceInventoryFeed>();
            var product         = _context.products.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productBC       = _context.productbigcommerces.FirstOrDefault(o => o.EisSKU == eisSKU);
            var productFeed     = new MarketplaceInventoryFeed()
            {
                EisSKU = product.EisSKU
            };

            productFeed.BigCommerceInventoryFeed = new BigCommerceInventoryFeed()
            {
                SKU                   = productBC.EisSKU,
                InventoryLevel        = productBC.InventoryLevel,
                InventoryWarningLevel = productBC.InventoryWarningLevel,
                InventoryTracking     = productBC.InventoryTracking,
                OrderQuantityMaximum  = productBC.OrderQuantityMaximum,
                OrderQuantityMinimum  = productBC.OrderQuantityMinimum,
                ProductId             = productBC.ProductId
            };

            productListFeed.Add(productFeed);

            // Act
            bcOrderInventoryProvider.SubmitProductInventoryFeeds(productListFeed, "Test");


            // Assert
        }