예제 #1
0
        public void GetTagsNoTags()
        {
            var op = new DeltaInsertOp("hello");
            var c  = new OpToXmlConverter(op);

            c.GetTags().Should().BeEquivalentTo(new string[] { });
        }
예제 #2
0
        public void GetTagsForFormula()
        {
            var o = new DeltaInsertOp(new InsertDataFormula(""));
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "span"
            });
        }
예제 #3
0
        public void GetTagsForVideo()
        {
            var o = new DeltaInsertOp(new InsertDataVideo(""));
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "iframe"
            });
        }
예제 #4
0
        public void GetTagsForHeader()
        {
            var o = new DeltaInsertOp("",
                                      new OpAttributes {
                Header = 2
            });
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "h2"
            });
        }
예제 #5
0
        public void GetTagsForList()
        {
            var o = new DeltaInsertOp("",
                                      new OpAttributes {
                List = ListType.Bullet
            });
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "li"
            });
        }
예제 #6
0
        public void GetTagsForCodeBlock()
        {
            var o = new DeltaInsertOp("",
                                      new OpAttributes {
                CodeBlock = true
            });
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "pre"
            });
        }
예제 #7
0
        public void GetTagsForMulti()
        {
            var o = new DeltaInsertOp("",
                                      new OpAttributes
            {
                Link      = "http",
                Script    = ScriptType.Sub,
                Bold      = true,
                Italic    = true,
                Strike    = true,
                Underline = true
            });
            var c = new OpToXmlConverter(o);

            c.GetTags().Should().BeEquivalentTo(new string[] {
                "a", "sub", "strong", "em", "s", "u"
            });
        }