public void GetVariable_Simple_String()
        {
            // ARRANGE
            DslConfigurationSection configurationSection = new DslConfigurationSection();
            configurationSection.AutoReload = true;
            configurationSection.BaseDirectory = Path.Combine(TestContext.DeploymentDirectory, "Boo");
            configurationSection.ThrowExceptions = true;

            var config = new ConfigMock(configurationSection);
            // ACT
            var myVar = config.GetVariable<string>("MyVar");
            // ASSERT
            myVar.ShouldEqual("Hallo Welt");
        }
 public ConfigMock(DslConfigurationSection configurationSection)
     : base(configurationSection, new EventHandler<CompilationErrorEventArgs>((object sender, CompilationErrorEventArgs e) => Console.WriteLine(e.Exception)), typeof(ConfigMock).Assembly)
 {
 }
        public void Init()
        {
            //Init ConfigSection
            configSection = new DslConfigurationSection();
            configSection.BaseDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config");
            configSection.AutoReload = true;
            configSection.ThrowExceptions = true;

            //ReSet startup errors
            dynamic dynConfig = typeof(DslConfig.Base.Boo.Configuration).AsDynamicType();
            dynConfig.startupErrors.Clear();
        }