private void TryRefresh(string expectedMessage, HomePageIndexes currentIndex, ViewModel currentViewModel)
 {
     HomeViewModel home = new HomeViewModel();
     bool isTestCompleteCalled = false;
     currentViewModel.TestCompleted += (sender, args) =>
         {
             Assert.AreEqual(args.Message, expectedMessage);
             if (currentIndex == HomePageIndexes.MySurveys)
             {
                 CallTestComplete(ref isTestCompleteCalled);
             }
         };
     
     home.CurrentPageIndex = currentIndex;
     home.RefreshCommand.Execute(null);
     if (currentIndex == HomePageIndexes.MySurveys)
     {
         EndOnWaitingResponse();
     }
 }
Пример #2
0
 /// <summary>
 /// Clears home view model.
 /// </summary>
 private static void ClearHomeView()
 {
     homeViewStatic = null;
 }
 public void CreationHomeTest()
 {
     HomeViewModel homeView = new HomeViewModel();
     Assert.AreEqual(homeView.CurrentPageIndex, HomePageIndexes.MySurveys);
     Assert.IsFalse(homeView.IsBusy);
 }
Пример #4
0
 /// <summary>
 /// Clears home view model.
 /// </summary>
 private static void ClearHomeView()
 {
     homeViewStatic = null;
 }