Ejemplo n.º 1
0
		public void EntryWithFullEtymology()
		{
			using (var session = new LiftExportAsFragmentTestSession())
			{
				var e = session.CreateItem();
				var etymology = new LexEtymology("theType", "theSource");
				etymology.SetAlternative("etr", "theProtoform");
				etymology.Gloss.SetAlternative("en", "engloss");
				etymology.Gloss.SetAlternative("fr", "frgloss");
				etymology.Comment.SetAlternative("en", "metathesis?");
				e.Etymologies.Add(etymology);
				session.LiftWriter.Add(e);
				session.LiftWriter.End();
				AssertHasOneMatch("entry/etymology/form[@lang='etr' and text='theProtoform']", session);
				AssertHasOneMatch("entry/etymology[@type='theType' and @source='theSource']", session);

				//handling of comments may change, the issue has been raised on the LIFT google group
				AssertHasOneMatch("entry/etymology/field[@type='comment']/form[@lang='en' and text='metathesis?']", session);
			}
		}
Ejemplo n.º 2
0
		public void EntryWithSimpleEtymology()
		{
			using (var session = new LiftExportAsFragmentTestSession())
			{
				var e = session.CreateItem();
				var etymology = new LexEtymology("theType", "theSource");
				etymology.SetAlternative("etr", "one");
				e.Etymologies.Add(etymology);
				session.LiftWriter.Add(e);
				session.LiftWriter.End();
				AssertHasOneMatch("entry/etymology/form[@lang='etr' and text='one']", session);
				AssertHasOneMatch("entry/etymology[@type='theType' and @source='theSource']", session);
			}
		}