public void Singup_AddNewUser_NewUserIsAdded()
        {
            //Arrange
            var User = new User {
                UserFirstName = "sam", UserLastName = "Jammoul", IsAdmin = false, Email = "*****@*****.**", Password = "******"
            };
            var client = new Client {
                UserFirstName = "sam", UserLastName = "Jammoul", IsAdmin = false, Email = "*****@*****.**", Password = "******"
            };
            UserCollectionlogic UserCollection = new UserCollectionlogic();
            ClientLogic         clientlogic    = new ClientLogic();
            bool IsContai = false;



            //Act
            UserCollection.SignUp(User);
            foreach (Client c in clientlogic.GetAllUsers())
            {
                if (c.UserFirstName == client.UserFirstName && c.IsAdmin == client.IsAdmin && c.Email == client.Email && c.Password == client.Password)
                {
                    IsContai = true;
                }
            }


            //Assert
            Assert.True(IsContai);
        }
        public ActionResult singUp(User model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            //string name = HttpContext.Session.GetString("name");
            //string email = HttpContext.Session.GetString("email");
            //string password = HttpContext.Session.GetString("password");

            UserCollectionlogic userCollectionLogic = new UserCollectionlogic(model);

            userCollectionLogic.SignUp(model);
            userCollectionLogic.sendwelcommail(model.Email, model.UserFirstName);

            return(RedirectToAction("Index", "Home"));
        }