public void PaLexEntry_EtymologyEmptyWorks() { var entry = CreateLexEntry(); // SUT var paEntry = new PaLexEntry(entry); Assert.Null(paEntry.xEtymology); }
public void PaLexEntry_EtymologySingleItemWorks() { var entry = CreateLexEntry(); var etymology = Cache.ServiceLocator.GetInstance <ILexEtymologyFactory>().Create(); entry.EtymologyOS.Add(etymology); var firstForm = TsStringUtils.MakeString("FirstForm", _enWsId); etymology.Form.set_String(_enWsId, firstForm); // SUT var paEntry = new PaLexEntry(entry); Assert.NotNull(paEntry.xEtymology); Assert.That(paEntry.xEtymology.Texts.Contains(firstForm.Text)); }
/// ------------------------------------------------------------------------------------ public string GetLexEntries() { return(PaLexEntry.GetAllAsXml(FieldWorks.Cache.ServiceLocator)); }