Exemple #1
0
        public void SetUp()
        {
            file1 = ParsingScenario.Create(scenario =>
            {
                scenario.WriteLine("MyFirstSettings:");
                scenario.WriteLine("  property1: 'string value'");
                scenario.WriteLine("  property2: 'another string value'");
                scenario.WriteLine("");

                scenario.WriteLine("MySecondSettings:");
                scenario.WriteLine("  anotherProperty1: 'some value'");
                scenario.WriteLine("  anotherProperty2: 'another value of some kind'");
            });

            file2 = ParsingScenario.Create(scenario =>
            {
                scenario.WriteLine("MyThirdSettings:");
                scenario.WriteLine("  someProperty: 'random value'");
            });

            theSettings = new ObjectBlockFileSettings();
            theSettings.AddFile(file1.FileName);
            theSettings.AddFile(file2.FileName);

            theSource = new ObjectBlockFileSource(theSettings, new FileSystem(), ObjectBlockReader.Basic());
        }
 public void SetUp()
 {
     theScenario = ParsingScenario.Create(scenario =>
     {
         scenario.WriteLine("MySettings:");
         scenario.WriteLine("  property1: 'string value'");
         scenario.WriteLine("  property2: 'another string value'");
         scenario.WriteLine("");
         scenario.WriteLine("MyOtherSettings:");
         scenario.WriteLine("  anotherProperty1: 'some value'");
         scenario.WriteLine("  anotherProperty2: 'another value of some kind'");
     });
 }
Exemple #3
0
        public void SetUp()
        {
            theScenario = ParsingScenario.Create(scenario =>
            {
                scenario.WriteLine("MySettings:");
                scenario.WriteLine("  property1: 'string value'");
                scenario.WriteLine("  property2: 'another string value'");
            });

            theFileSettings = new ObjectBlockFileSettings();
            theFileSettings.AddFile(theScenario.FileName);

            theReader   = ObjectBlockReader.Basic();
            theSource   = new ObjectBlockFileSource(theFileSettings, new FileSystem(), theReader);
            theProvider = new ObjectBlockSettingsProvider(new IObjectBlockSource[] { theSource }, theReader);

            theSettings = theProvider.SettingsFor <MySettings>();
        }