public void SetUp()
 {
     module = new TestModule();
     mockLoginDlg=new  Mock<ILoginDialog>();
     mockLoginDlg.SetupAllProperties();
     module.Container.RegisterInstance<ILoginDialog>(mockLoginDlg.Object);
     presenter = module.Container.Resolve<QuickTestPresenter>();
     SSOConfiguration = module.Container.Resolve<ISSOConfiguration>();            
 }
 public Attempter(LoginDialogPresenter presenter)
 {
     dispatcher = Dispatcher.CurrentDispatcher;
     thread = new Thread(a =>
     {
         try
         {
             while (true)
             {
                 Thread.Sleep(presenter.Delay);
                dispatcher.Invoke(new Action(() =>
                     {
                         if (!disposed)
                         {
                             presenter.Tick();
                         }
                     }));
                 if (disposed) break;
             }
         }
         catch (Exception ex)
         {
             Logger.LogError(ex);
         }
     });
     thread.Start();
 }