Ejemplo n.º 1
0
        /// <summary>
        /// Handles new user creation fields
        /// </summary>
        private void CreateNewUser()
        {
            string username;
            string pass;
            string verifyPass;
            Task <Tuple <bool, string> > newUserResult = null;

            Console.Clear();

            SignupView.Username();
            username = Console.ReadLine();

            SignupView.Password();
            pass = ConsoleHelper.GetConsolePassword();

            SignupView.VerifyPassword();
            verifyPass = ConsoleHelper.GetConsolePassword();

            newUserResult = Task.Run(()
                                     => SignupEventRaised.Invoke(username, pass, verifyPass));

            newUserResult.Wait();

            Console.Clear();

            if (!newUserResult.Result.Item1)
            {
                ConsoleHelper.ConsoleWriteColor(
                    ConsoleColor.Red, newUserResult.Result.Item2, true
                    );
                Signup();
            }
        }
Ejemplo n.º 2
0
        public void Signup()
        {
            KISSBankingPresenter KISSPresenter = new KISSBankingPresenter(this);
            var signupTest = SignupEventRaised.Invoke(RandomString(5), "testPass", "testPass");

            signupTest.Wait();
            Assert.AreEqual(signupTest.Result.Item1, true);
        }