Exemplo n.º 1
0
        public static void StubCreateSafeForExistingUser(this ISafeProviderForExistingUser safeProvider, string validUserName, string validPassword, ISafe safe)
        {
            ISafe outSafe;

            safeProvider.TryCreateSafeForExistingUser(validUserName, validPassword, out outSafe)
            .Returns(x =>
            {
                x[2] = safe;
                return(true);
            });
        }
        private void SignIn()
        {
            ISafe safe;

            if (!_safeProviderForExistingUser.TryCreateSafeForExistingUser(SignInUserName, SignInPassword, out safe))
            {
                ErrorMessage = WrongPasswordErrorMessage;
            }
            else
            {
                _signUpCompletionCallback.Invoke(safe, SignInUserName);
            }
        }