Exemplo n.º 1
0
        public void GetHtmlWorks()
        {
            var c1  = new OpToXmlConverter(_htmlPartsOp);
            var doc = new XmlDocument();
            var act = c1.GetXml(doc);

            act.OuterXml.Should().Be(_htmlPartsResult);
        }
Exemplo n.º 2
0
        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>");
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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>");
        }