Ejemplo n.º 1
0
        public void ReadProductFileValidationTest()
        {
            //-- Arrange

            DataImporterService dataImporterService = new DataImporterService();
            ProductService      productService      = new ProductService();

            Companies = dataImporterService.GetCompanies();
            Feeds     = dataImporterService.GetFeeds();
            Products  = new List <Product>();
            //return Ok();
            foreach (Company company in Companies)
            {
                foreach (Feed feed in Feeds)
                {
                    if (company.Id.ToString().Substring(0, 1) == feed.Id.ToString().Substring(0, 1))
                    {
                        //Get Product for Company Feed
                        foreach (Product product in productService.GetProducts(company, feed))
                        {
                            Products.Add(product);
                        }
                    }
                }
            }

            //-- Act
            int actual = 18000;

            //-- Assert
            Assert.AreEqual(Products.Count, actual);
        }
Ejemplo n.º 2
0
        public void ReadCompanyFileValidationTest()
        {
            //-- Arrange

            DataImporterService dataImporterService = new DataImporterService();
            ProductService      productService      = new ProductService();

            Companies = dataImporterService.GetCompanies();
            int dataCount = 0;

            foreach (Company comoany in Companies)
            {
                dataCount++;
            }

            //-- Act
            int actual = 3;

            //-- Assert
            Assert.AreEqual(dataCount, actual);
        }