Ejemplo n.º 1
0
        public ConfigurationExchange(ConfigurationGlobal global)
        {
            Pages = new List <ConfigurationItemGroup>();

            foreach (ConfigurationItemGroup item in global.GetPages())
            {
                Pages.Add(item);
            }
        }
        private void WriteEmptyStandardConfiguration()
        {
            ConfigurationGlobal   global = new ConfigurationGlobal();
            ConfigurationExchange output = new ConfigurationExchange(global);

            bool writeConfiguration = ConfigurationSerializer.WriteConfiguration(output, WritingEmptyConfigurationPath);

            Assert.IsTrue(writeConfiguration, "Configuration: " + WritingEmptyConfigurationPath + " could not be written.");

            Assert.IsTrue(File.Exists(WritingEmptyConfigurationPath), "File " + WritingEmptyConfigurationPath + " was serialized but is not there.");
        }
        private void WriteEmptyPages(int pageCount)
        {
            Assert.IsTrue(!File.Exists(CreatingPagesPath), "File " + CreatingPagesPath + " is allready there.");

            ConfigurationGlobal global = new ConfigurationGlobal();

            for (int i = 0; i < pageCount; i++)
            {
                global.AddPage(new ConfigurationItemGroup());
            }


            ConfigurationExchange output = new ConfigurationExchange(global);

            bool writeConfiguration = ConfigurationSerializer.WriteConfiguration(output, CreatingPagesPath);

            Assert.IsTrue(writeConfiguration, "Configuration: " + CreatingPagesPath + " could not be written.");

            Assert.IsTrue(File.Exists(CreatingPagesPath), "File " + CreatingPagesPath + " was serialized but is not there.");
        }