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

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

            Assert.AreEqual(5, result.Count());
            Assert.IsTrue(element.IsWaterfall);
            Assert.IsTrue(element.IsFixed);
            Assert.IsTrue(element.IsPaged);
        }