Ejemplo n.º 1
0
        public void ParseBodenProductTest()
        {
            BodenParser bodenParser = new BodenParser();
            string      url         = "http://www.boden.co.uk/en-gb/girls-dresses/knitted-dresses/g1095-red/girls-polish-red-snowmen-fair-isle-knitted-dress";
            Product     product     = bodenParser.ParseBodenProduct(url);

            Assert.IsTrue(product.GetPriceInfos().Length > 0);
        }
Ejemplo n.º 2
0
        public void ParseBodenPageTest()
        {
            BodenParser bodenParser = new BodenParser();

            Console.WriteLine(@"Parsing page");
            IEnumerable <string> links = bodenParser.ParseBodenProductList("http://www.boden.co.uk/en-gb/girls-dresses");

            Assert.AreEqual(90, links.Count());
            IList <Product> products = new List <Product>();

            foreach (string link in links)
            {
                Console.WriteLine(@"Processing link {0}", link);
                products.Add(bodenParser.ParseBodenProduct(link));
            }
        }
Ejemplo n.º 3
0
 public AdminController(IProductRepository repo)
 {
     repository  = repo;
     nextParser  = new NextParser();
     bodenParser = new BodenParser();
 }