public void RemoveSectionAddedDiffs_WithSectionAddedDiff() { List <Difference> diffList = new List <Difference>(); diffList.Add(new Difference(null, 0, 0, null, 0, 0, DifferenceType.VerseAddedToCurrent, null, null, null, null)); IScrSection dummySection = MockRepository.GenerateStub <IScrSection>(); dummySection.VerseRefStart = 01001001; dummySection.VerseRefEnd = 01001002; dummySection.Stub(s => s.Owner).Return(m_genesis); IStText heading = dummySection.HeadingOA = MockRepository.GenerateStub <IStText>(); heading.Stub(h => h.OwningFlid).Return(ScrSectionTags.kflidHeading); IScrTxtPara headingPara1 = MockRepository.GenerateStub <IScrTxtPara>(); heading.Stub(text => text[0]).Return(headingPara1); headingPara1.Stub(p => p.Owner).Return(heading); heading.Stub(h => h.Owner).Return(dummySection); diffList.Add(new Difference(01001001, 01001002, DifferenceType.SectionAddedToCurrent, new [] { dummySection }, headingPara1, 0)); m_bookMerger.TestDiffList = diffList; Assert.AreEqual(2, m_bookMerger.Differences.Count); // Set the active difference list to one with the SectionAddedToCurrent diffs removed. // (This will call RemoveSectionAddedDiffs). m_bookMerger.UseFilteredDiffList = true; // We expect that only one of the differences (a VerseAddedToCurrent diff) will remain. Assert.AreEqual(1, m_bookMerger.Differences.Count); Difference diff = m_bookMerger.Differences.MoveFirst(); Assert.AreEqual(DifferenceType.VerseAddedToCurrent, diff.DiffType); }