/// <summary>
        /// Method for creating an order
        /// Separated from the rest in order to test
        /// </summary>
        /// <param name="newOrder">New order item</param>
        /// <param name="OrderPath">Path to orders csv file</param>
        /// <param name="StockPath">Path to stock csv file</param>
        /// <param name="orders">Orders object</param>
        /// <param name="stock">Stock object</param>
        static public void AddElement(OrderItem newOrder, string OrderPath,
                                      string StockPath, RestaurantStock stock, RestaurantOrders orders)
        {
            List <int> productIds = newOrder.GetProductIds();
            /// Cycle trough items
            bool canBeAdded = true;

            foreach (int i in productIds)
            {
                /// Check if the component can be added
                if (stock.GetItemByID(i).CheckIfEnoughInStock())
                {
                    canBeAdded = true;
                }
                else
                {
                    canBeAdded = false;
                    break;
                }
            }

            if (!canBeAdded)
            {
                Console.WriteLine(" Error: There is not enough of product for this order!\r\n");
            }
            else if (orders.AddNewEntry(newOrder))
            {
                List <StockItem> updatedStock = new List <StockItem>();
                /// Reduce components
                foreach (int i in productIds)
                {
                    updatedStock.Add(stock.GetItemByID(i));
                    stock.GetItemByID(i).UpdateElement();
                }

                Console.WriteLine(" Item added succesfully\r\n");
                fileInterface.UpdateEntryInFile(StockPath, updatedStock);
                fileInterface.AddEntryToFile(OrderPath, newOrder);
            }
            else
            {
                Console.WriteLine(" Error: Item was not added\r\n");
            }
        }