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; } }
/// <summary> /// This is the constructor for the class RMQ_SpecialCalls. /// </summary> private RMQ_SpecialCalls() { this.ctr_order = new CTR_Order(); this.ctr_orderdetail = new CTR_OrderDetail(); this.ctr_product = new CTR_Product(); this.ctr_user = new CustomUserController(); this.ctr_userproduct = new CTR_UserProduct(); }
public void TestProducts() { CTR_Product ctr_product = new CTR_Product(); List <Product> products = ListOfProducts(); foreach (Product product in products) { ctr_product.Create(product); } }
/// <summary> /// This is the constructor for the class RMQ_Product. /// </summary> private RMQ_Product() { ctr_product = new CTR_Product(); }