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(); }