Beispiel #1
0
        public void PaLexEntry_EtymologyEmptyWorks()
        {
            var entry = CreateLexEntry();
            // SUT
            var paEntry = new PaLexEntry(entry);

            Assert.Null(paEntry.xEtymology);
        }
Beispiel #2
0
        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));
 }