public void MergeInNote_NoteHasTypeOtherThanGeneral_AllGoesToRoundTripResidue() { LexEntry e = MakeSimpleEntry(); _builder.MergeInNote(e, "red", MakeBasicLiftMultiText(), "<pretendXmlOfNote/>"); MultiText mt = e.GetProperty <MultiText>(PalasoDataObject.WellKnownProperties.Note); Assert.IsNull(mt); var residue = e.GetProperty <EmbeddedXmlCollection>(PalasoDataObject.GetEmbeddedXmlNameForProperty(PalasoDataObject.WellKnownProperties.Note)); Assert.AreEqual(1, residue.Values.Count); Assert.AreEqual("<pretendXmlOfNote/>", residue.Values[0]); }
public void MergeInNote_NoType_AfterFirstTheyGoesToRoundTripResidue() { LexEntry e = MakeSimpleEntry(); _builder.MergeInNote(e, string.Empty, MakeBasicLiftMultiText("first"), "pretend xml one"); _builder.MergeInNote(e, string.Empty, MakeBasicLiftMultiText("second"), "<pretend xml two/>"); _builder.MergeInNote(e, string.Empty, MakeBasicLiftMultiText("third"), "<pretend xml three/>"); MultiText mt = e.GetProperty <MultiText>(PalasoDataObject.WellKnownProperties.Note); Assert.AreEqual("first", mt["ws-one"]); var residue = e.GetProperty <EmbeddedXmlCollection>(PalasoDataObject.GetEmbeddedXmlNameForProperty(PalasoDataObject.WellKnownProperties.Note)); Assert.AreEqual(2, residue.Values.Count); Assert.AreEqual("<pretend xml two/>", residue.Values[0]); Assert.AreEqual("<pretend xml three/>", residue.Values[1]); }