コード例 #1
0
        public void GetCssClassesReturnsNoClassesWithInlineStyles()
        {
            var o = new DeltaInsertOp("f", _styleAttributes);
            var c = new OpToXmlConverter(o, _styleConverterOptions);

            c.GetCssClasses().Should().BeEquivalentTo(new string[] { });
        }
コード例 #2
0
        public void GetCssClassesReturnsClasses()
        {
            var o = new DeltaInsertOp("f", _styleAttributes);
            var c = new OpToXmlConverter(o);

            c.GetCssClasses().Should().BeEquivalentTo(_styleClasses);
        }
コード例 #3
0
        public void GetCssClassesReturnsEmptyArrayWithNoClasses()
        {
            var op = new DeltaInsertOp("hello");
            var c  = new OpToXmlConverter(op);

            c.GetCssClasses().Should().BeEquivalentTo(new string[] { });
        }
コード例 #4
0
        public void GetCssClassesReturnsClassesForFormula()
        {
            var o = new DeltaInsertOp(new InsertDataFormula(""), _styleAttributes);
            var c = new OpToXmlConverter(o);

            c.GetCssClasses().Should().BeEquivalentTo(_styleClasses.Concat(
                                                          Enumerable.Repeat("ql-formula", 1)));
        }
コード例 #5
0
        public void GetCssClassesWithBackgroundClasses()
        {
            var o = new DeltaInsertOp("f", _styleAttributes);
            var c = new OpToXmlConverter(o, new OpToXmlConverterOptions()
            {
                AllowBackgroundClasses = true
            });

            c.GetCssClasses().Should().BeEquivalentTo(_styleClasses.Concat(
                                                          Enumerable.Repeat("ql-background-red", 1)));
        }