public void PreprocessSwitchCommandsSetsDefaultValuesWhenNoSwitchCommandsExist() { Document doc = new Document(); var slide = new SlideElement(doc); TableElement element = TableElement.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.IsFixed); Assert.IsFalse(element.IsPaged); }
public void PreprocessSwitchCommandsGetAllCommandsIfTheyExist() { Document doc = new Document(); var slide = new SlideElement(doc); TableElement element = TableElement.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.IsFixed); Assert.IsTrue(element.IsPaged); }