public void ReplaceDeltaEnqueues() { var doc = DomOperationsTesting.CreateDocument(); doc.OpenEventQueue(); ReplaceDelta.Enqueue(doc, "test"); var q = doc.GetQueue(); Assert.Single(q); var first = q.Peek() as ReplaceDelta; Assert.NotNull(first); Assert.Equal("test", first !.Location); }
public void TextModifiedGenerated() { var doc = DomOperationsTesting.CreateDocument(); var span = Element.Create("span"); span.InnerText = "a"; doc.Body.AppendChild(span); doc.OpenEventQueue(); span.InnerText = "test"; var q = doc.GetQueue(); Assert.Single(q); var first = q.Peek() as TextModifiedDelta; Assert.NotNull(first); Assert.Equal("test", first !.Text); Assert.Equal(span.Id, first.ParentElementId); Assert.Equal(0, first.ChildNodeIndex); }