Ejemplo n.º 1
0
        public void Remove(Article article)
        {
            if (article == null)
            {
                throw new ArgumentNullException("article", "Article can't be null");
            }

            this.articles.Remove(article.GetHashCode(), article);
        }
Ejemplo n.º 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;
        }