View model for login view.
Наследование: ViewModel
 public void CreationLoginTest()
 {
     LoginViewModel loginViewModel = new LoginViewModel();
     Assert.IsFalse(loginViewModel.IsBusy);
     Assert.IsNotNull(loginViewModel.LoginCommand);
     Assert.IsNotNull(loginViewModel.InitializeViewModelCommand);
 }
        internal void TryLogin(string login, string password, string serverPath, string resultMessage)
        {
            LoginViewModel loginViewModel = new LoginViewModel();
            loginViewModel.Login = login;
            bool isTestCompletedCalled = false;
            loginViewModel.Password = password;
            loginViewModel.ServerPath = serverPath;
            loginViewModel.TestCompleted += (sender, args) =>
            {
                if (args.Message == resultMessage)
                {
                    CallTestComplete(ref isTestCompletedCalled);
                }
            };

            Assert.IsTrue(loginViewModel.LoginCommand.CanExecute(null));
            loginViewModel.LoginCommand.Execute(null);
            if (serverPath != FALLING_SERVER_PATH)
            {
                EndOnWaitingResponse();
            }
        }
Пример #3
0
 /// <summary>
 /// Clears login view.
 /// </summary>
 private static void ClearLoginView()
 {
     loginViewStatic = null;
 }