public void WhenIsSkippedFlagAsSkipped() { // Arrange var mockSpeachService = new Mock <ISpeachService>(); var spellings = new ObservableCollection <SpellingViewModel>(); var s = new Spelling() { Word = "Dog", ContextSentence = "The dog and bone" }; var svm = new SpellingViewModel(s); spellings.Add(svm); var sut = new SpellTestService(spellings, mockSpeachService.Object); sut.NextQuestion(); // Act sut.SkipQuestion(); // Assert Assert.Equal(svm.CorrectCount, 0); Assert.Equal(svm.ErrorCount, 0); Assert.Equal(svm.Skipped, true); }
public void Next_Should_Return_Null_When_All_Skipped() { var mockSpeachService = new Mock <ISpeachService>(); var spellings = new ObservableCollection <SpellingViewModel>(); var s = new Spelling() { Word = "Dog", ContextSentence = "The dog and bone" }; var svm = new SpellingViewModel(s); spellings.Add(svm); var sut = new SpellTestService(spellings, mockSpeachService.Object); var q = sut.NextQuestion(); // Act q = sut.SkipQuestion(); Assert.Null(q); q = sut.NextQuestion(); // Assert Assert.Null(q); }