View model for my surveys.
Наследование: ViewModel
 public void CreationMySurveys()
 {
     MySurveysViewModel mySurveys = new MySurveysViewModel();
     Assert.AreEqual(string.Empty, mySurveys.SearchText);
     Assert.AreEqual(0, mySurveys.TopSurveys.Count, mySurveys.DisplayedSurveyses.Count);
     Assert.IsFalse(mySurveys.IsBusy);
     Assert.IsTrue(mySurveys.DeleteSurveyCommand.CanExecute(null));
 }
 public void InitializationTest()
 {
     MySurveysViewModel mySurvey = new MySurveysViewModel();
     SurveyMock.RemoveAllSurveys();
     SurveyMock.GenerateSurveys(SURVEYS_COUNT);
     mySurvey.InitializeViewModelCommand.Execute(null);
     Assert.AreEqual(MySurveysViewModel.TOP_SURVYES_COUNT, mySurvey.TopSurveys.Count);
     Assert.AreEqual(0, mySurvey.DisplayedSurveyses.Count);
     Assert.AreEqual(string.Empty, mySurvey.SearchText);
 }
        public void InitializationOnSearchTest()
        {
            AddPageParameters(MySurveysViewModel.IS_FOR_SEARCHING + "=true");
            MySurveysViewModel mySurvey = new MySurveysViewModel();
            SurveyMock.RemoveAllSurveys();
            SurveyMock.GenerateSurveys(SURVEYS_COUNT);
            mySurvey.InitializeViewModelCommand.Execute(null);

            Assert.AreEqual(SURVEYS_COUNT, mySurvey.DisplayedSurveyses.Count);
            Assert.AreEqual(0, mySurvey.TopSurveys.Count);

            ClearPageParameters();    
        }
Пример #4
0
 /// <summary>
 /// Clears my surveys view model.
 /// </summary>
 private static void ClearMySurveys()
 {
     mySurveysStatic = null;
 }
Пример #5
0
 /// <summary>
 /// Clears my surveys view model.
 /// </summary>
 private static void ClearMySurveys()
 {
     mySurveysStatic = null;
 }