public void ISenseOrEntryHeadwordRef_IncludesSenseNumber() { var mainEntry = CreateInterestingLexEntry(Cache, "MainEntry", "MainSense"); AddSenseToEntry(mainEntry, "SecondSense", EnsureWritingSystemSetup(Cache, "en", false), Cache); var secondSense = new SenseOrEntry(mainEntry.SensesOS[1]); CreateInterestingLexEntry(Cache, "MainEntry", "Nonsense"); // create a homograph // SUT Assert.AreEqual("MainEntry1 2", secondSense.HeadWordRef.BestVernacularAlternative.Text); }
public void ISenseOrEntryHeadwordRef_IncludesSenseNumber() { var mainEntry = CreateInterestingLexEntry(Cache, "MainEntry", "MainSense"); AddSenseToEntry(mainEntry, "SecondSense", EnsureWritingSystemSetup(Cache, "en", false), Cache); var secondSense = new SenseOrEntry(mainEntry.SensesOS[1]); CreateInterestingLexEntry(Cache, "MainEntry", "Nonsense"); // create a homograph // Set default sense number style var settings = Cache.ServiceLocator.GetInstance <HomographConfiguration>(); settings.ksSenseNumberStyle = "%d"; // SUT Assert.AreEqual("MainEntry1 2", secondSense.HeadWordRef.BestVernacularAlternative.Text); }
public void ISenseOrEntryHeadwordRef_SenseNumberNotShownWhenHCSenseIsNotShown() { var mainEntry = CreateInterestingLexEntry(Cache, "MainEntry", "MainSense"); AddSenseToEntry(mainEntry, "SecondSense", EnsureWritingSystemSetup(Cache, "en", false), Cache); var secondSense = new SenseOrEntry(mainEntry.SensesOS[1]); var referencedEntry = CreateInterestingLexEntry(Cache); CreateLexicalReference(mainEntry, referencedEntry, ""); CreateInterestingLexEntry(Cache, "MainEntry", "Nonsense"); // Set empty sense number style var settings = Cache.ServiceLocator.GetInstance <HomographConfiguration>(); settings.ksSenseNumberStyle = ""; // SUT Assert.AreEqual("MainEntry1", secondSense.HeadWordRef.BestVernacularAlternative.Text); }