Пример #1
0
        public void WrongDetailsToNewUserException()
        {
            IUserDAO            _userDAO  = new UserDAOPGSQL();
            AnonymousUserFacade anonymous = new AnonymousUserFacade();
            User user = new User
            {
                User_Name = "Moshe87",
                Password  = "******",
                Email     = "*****@*****.**",
                User_Role = 3
            };
            Customer customer = new Customer();

            customer.User = user;
            anonymous.AddNewCustomer(customer);
        }
Пример #2
0
        public void AddNewUser_Test()
        {
            IUserDAO            _userDAO  = new UserDAOPGSQL();
            AnonymousUserFacade anonymous = new AnonymousUserFacade();
            User user = new User
            {
                User_Name = "Moshe817",
                Password  = "******",
                Email     = "*****@*****.**",
                User_Role = 3
            };
            Customer customer = new Customer
            {
                First_Name     = "Moshe",
                Last_Name      = "yakov",
                Address        = "king5",
                Phone_No       = "050-1351151",
                Credit_Card_No = "1212123545",
                User           = user
            };

            anonymous.AddNewCustomer(customer);
            Assert.AreEqual(_customerDAO.GetAll().Count, 3);
        }