Beispiel #1
0
        public void ConstructorTest()
        {
            var model = new CustomDataModel();

            model.Id         = ConfigurationService.CONFIGURATION_FILE;
            model.ContentRaw = _config;
            model.Parse();

            var config = new SolidifyConfiguration(model);

            Assert.AreEqual("engine", config.Engine.Path);
            Assert.AreEqual("src", config.Source.Path);
            Assert.AreEqual("www", config.Output.Path);
        }
Beispiel #2
0
        private SolidifyConfiguration getConfiguration()
        {
            var reader = new FileSystemTextContentReaderService <CustomDataModel>(_root);
            var config = reader.LoadContentByIdAsync(CONFIGURATION_FILE).Result;

            if (config == null)
            {
                throw new FileNotFoundException("Solidify configuration file not found", Path.Combine(_root, CONFIGURATION_FILE));
            }

            var model = new SolidifyConfiguration(config);

            return(model);
        }