public void Initialize() { //Connects to classes that handles RabbitMQ rmq_order = RMQ_Order.GetInstance(); rmq_orderdetail = RMQ_OrderDetail.GetInstance(); rmq_product = RMQ_Product.GetInstance(); rmq_user = RMQ_User.GetInstance(); rmq_userproduct = RMQ_UserProduct.GetInstance(); rmq_specialcalls = RMQ_SpecialCalls.GetInstance(); rmq_sender = RMQ_Sender.GetInstance(); //Connects to classes that lies in the Control layer. ctr_order = new CTR_Order(); ctr_orderdetail = new CTR_OrderDetail(); ctr_product = new CTR_Product(); ctr_userproduct = new CTR_UserProduct(); ctr_user = new CustomUserController(); //Gets the products for the tests List <Product> part_products = ctr_product.ListAll(); products = new List <int>(); product_price = 0.0; //Calsulate the total price for the products foreach (Product product in part_products) { products.Add(product.Id); product_price += product.Price; } }