public void DeleteQuestionTest() { // Arrange MainViewModel mainViewModel = new MainViewModel(); var i = mainViewModel.Questions.Count; // Act mainViewModel.DeleteQuestion(); var j = mainViewModel.Questions.Count; // Assert Assert.AreEqual((i - 1), j); }
public void AddQuestionTest() { // Arrange MainViewModel mainViewModel = new MainViewModel(); var i = mainViewModel.Questions.Count; // Act mainViewModel.SelectedQuestion.Id = 1; mainViewModel.SelectedQuestion.Text = "this is a test question"; mainViewModel.SaveQuestion(); var j = mainViewModel.Questions.Count; // Assert Assert.AreEqual((i + 1), j); }