예제 #1
0
        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;
            }
        }
예제 #2
0
 /// <summary>
 /// This is the constructor for the class RMQ_Order.
 /// </summary>
 private RMQ_Order()
 {
     ctr_order       = new CTR_Order();
     ctr_orderdetail = new CTR_OrderDetail();
     ctr_userproduct = new CTR_UserProduct();
     ctr_user        = new CustomUserController();
 }
예제 #3
0
 /// <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();
 }