Exemplo n.º 1
0
        public string TestOrders(int index)
        {
            string     result;
            CustomUser user;

            Console.WriteLine("Creating User");
            user = new CustomUser
            {
                Username = "******" + index.ToString(),
                Password = "******",
                Email    = "*****@*****.**",
                Wallet   = 250000,
                IsActive = true,
                LoggedIn = false
            };

            Console.WriteLine("Saving User");
            ctr_user.Create(user);

            Console.WriteLine("saving order and send message");
            result = ctr_order.Create(user.Username, products);
            rmq_specialcalls.NewOrders(user.Username);

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a user.
        /// </summary>
        /// <param name="informations"></param>
        public void CreateUser(List <string> informations)
        {
            CustomUser user = new CustomUser
            {
                Username = informations[0],
                Password = informations[1],
                Email    = informations[2],
                Wallet   = Double.Parse(informations[3])
            };

            Console.WriteLine("Create User: " + ctr_user.Create(user));
        }
Exemplo n.º 3
0
 public string AddCustomUser(CustomUser val)
 {
     return(ctrl.Create(val));
 }