PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Configuration/Xml/for_ConfigParser/when_config_object_has_a_string_property_and_no_xml_setting_it.cs

#
C# | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | 5832ca296fbb28c6e73bc39b9b775410 MD5 | raw file
 1using System.Xml.Linq;
 2using Machine.Specifications;
 3
 4namespace Bifrost.Specs.Configuration.Xml.for_ConfigParser
 5{
 6    public class when_config_object_has_a_string_property_and_no_xml_setting_it : given.a_config_parser
 7    {
 8        static XDocument document;
 9        static ConfigObjectWithStringProperty config;
10
11        Establish context = () =>
12                                {
13                                    document = XDocument.Parse("<ConfigObjectWithStringProperty/>");
14                                };
15
16        Because of = () => config = parser.Parse<ConfigObjectWithStringProperty>(document);
17
18        It should_not_set_property = () => config.Something.ShouldBeNull();
19    }
20}