Exemple #1
0
        public void PreprocessSwitchCommandsSetsDefaultValuesWhenNoSwitchCommandsExist()
        {
            Document     doc      = new Document();
            var          slide    = new SlideElement(doc);
            ShapeElement element  = ShapeElement.Create("TEST", null, slide);
            var          commands = new List <Command>()
            {
                new FormatCommand(), new FormulaCommand(), new FixedCommand()
            };
            var result = element.PreprocessSwitchCommands(commands);

            Assert.AreEqual(3, result.Count());
            Assert.IsFalse(element.IsContentProtected);
        }
Exemple #2
0
        public void PreprocessSwitchCommandsGetAllCommandsIfTheyExist()
        {
            Document     doc      = new Document();
            var          slide    = new SlideElement(doc);
            ShapeElement element  = ShapeElement.Create("TEST", null, slide);
            var          commands = new List <Command>()
            {
                new FormatCommand(), new FormulaCommand(), new NoContentCommand(), new FixedCommand()
            };
            var result = element.PreprocessSwitchCommands(commands);

            Assert.AreEqual(3, result.Count());
            Assert.IsTrue(element.IsContentProtected);
        }