Esempio n. 1
0
        public static Warehouse RandomPopulateWarehouse(int numberOfItems, bool isRotary)
        {
            var random = new Random();

            var warehouse = new Warehouse(numberOfItems, isRotary);

            for (var i = 0; i < numberOfItems; i++)
            {
                if (random.Next(0, 10) > 1)
                {
                    warehouse.AddItemToList(i, new Item(string.Empty, 0));
                    continue;
                }

                warehouse.AddItemToList(i, new Item(AdditionalMethods.RandomString(10), 1));
            }

            return(warehouse);
        }