public void ReplaceCoreText() { MockTextRepository mockTextRepo = MakeMockTextRepoWithTwoMockTexts(); var testObj = new InterestingTextList(m_propertyTable, mockTextRepo, m_mockStTextRepo); var firstStText = testObj.InterestingTexts.First(); MockText firstText = firstStText.Owner as MockText; var replacement = new MockStText(); testObj.InterestingTextsChanged += TextsChangedHandler; firstText.ContentsOA = replacement; testObj.PropChanged(firstText.Hvo, TextTags.kflidContents, 0, 1, 1); VerifyList(CurrentTexts(mockTextRepo), testObj.InterestingTexts, "texts after replace"); // Various possibilities could be valid for the arguments...for now just verify we got something. Assert.That(m_lastTextsChangedArgs, Is.Not.Null); }
public MockText() { ContentsOA = new MockStText(); }