Beispiel #1
0
        public void IsVideoImageFormula()
        {
            var op = new DeltaInsertOp(new InsertDataVideo(""));

            op.IsVideo().Should().BeTrue();
            op.IsFormula().Should().BeFalse();
            op.IsImage().Should().BeFalse();

            op = new DeltaInsertOp(new InsertDataImage("d"));
            op.IsImage().Should().BeTrue();
            op.IsFormula().Should().BeFalse();

            op = new DeltaInsertOp(new InsertDataFormula("d"));
            op.IsVideo().Should().BeFalse();
            op.IsFormula().Should().BeTrue();
        }
Beispiel #2
0
        public void IsText()
        {
            var op = new DeltaInsertOp("\n", new OpAttributes {
                List = ListType.Bullet
            });

            op.IsVideo().Should().BeFalse();
            op.IsText().Should().BeTrue();

            op = new DeltaInsertOp(new InsertDataImage("d"),
                                   new OpAttributes {
                List = ListType.Ordered
            });
            op.IsImage().Should().BeTrue();
            op.IsText().Should().BeFalse();
        }