Example #1
0
        private static void ProcessPriceSearches(Store catalog, int count)
        {
            for (int i = 0; i < count; i++)
            {
                var products = catalog.FilterByPriceRange(generator.GetRandomNumber(1, 5), generator.GetRandomNumber(6, 25));

                // TODO: If you have free time uncomment this code :)
                //foreach (var product in products)
                //{
                //    Console.WriteLine(product);
                //}
            }
        }
Example #2
0
        private static Store MakeStore(int count)
        {
            var result = new Store();

            for (int i = 0; i < count; i++)
            {
                var article = new Article()
                {
                    Barcode = generator.GetRandomString(30, 50),
                    Vendor = generator.GetRandomString(20, 80),
                    Title = generator.GetRandomString(20, 80),
                    Price = generator.GetRandomNumber(1, 50),
                };

                result.Add(article);
            }

            return result;
        }