main
 1using System.Collections.Specialized;
 2using jive;
 3using Machine.Specifications;
 4
 5namespace specs.unit.utility
 6{
 7  public class SettingsSpecs
 8  {
 9    public abstract class concern
10    {
11      Establish context = () =>
12      {
13        settings = new NameValueCollection();
14        sut = new Settings(settings);
15      };
16
17      static protected Settings sut;
18      static protected NameValueCollection settings;
19    }
20
21    public class when_pulling_out_a_setting : concern
22    {
23      It should_return_the_correct_value = () => result.should_be_true();
24
25      Establish context = () => { settings["the.key"] = "true"; };
26
27      Because of = () => { result = sut.named<bool>("the.key"); };
28
29      static bool result;
30    }
31  }
32}