public void GetHtmlWorks() { var c1 = new OpToXmlConverter(_htmlPartsOp); var doc = new XmlDocument(); var act = c1.GetXml(doc); act.OuterXml.Should().Be(_htmlPartsResult); }
public void GetHtmlForImageWorks() { var op = new DeltaInsertOp(new InsertDataImage("http://")); var c1 = new OpToXmlConverter(op); var doc = new XmlDocument(); c1.GetXml(doc).OuterXml.Should().Be( "<img class=\"ql-image\" src=\"http://\"></img>"); }
public void GetHtmlForNLIgnoresColour() { var op = new DeltaInsertOp("\n", new OpAttributes { Color = "#fff" }); var c1 = new OpToXmlConverter(op); var doc = new XmlDocument(); c1.GetXml(doc).OuterXml.Should().Be("\n"); }
public void GetXmlWithNullInputString() { var op = new DeltaInsertOp( new InsertDataText(null), new OpAttributes { Bold = true }); var converter = new OpToXmlConverter(op); var doc = new XmlDocument(); converter.GetXml(doc).OuterXml.Should().Be("<strong></strong>"); }