public void Whitespace_around_separator_matters_not() { var input = "key1=value1"; var props = new Properties(input); props.Count().ShouldBe(1); props.GetProperty("key1").ShouldBe("value1"); }
public void Valid_lines_are_parsed() { var input = "key1 = value1"; var props = new Properties(input); props.Count().ShouldBe(1); props.GetProperty("key1").ShouldBe("value1"); }
public void Windows_newlines_can_separate_items() { var input = "foo=bar\r\nbar=baz"; var props = new Properties(input); props.Count().ShouldBe(2); props.GetProperty("foo").ShouldBe("bar"); props.GetProperty("bar").ShouldBe("baz"); }
public void Commented_lines_are_ignored() { var input = "# This line is commented\r\n" + "! so = is this one"; var props = new Properties(input); props.Count().ShouldBe(0); }
public void Empty_string_returns_empty_dictionary() { var props = new Properties(string.Empty); props.Count().ShouldBe(0); }
public void Null_string_returns_empty_dictionary() { var props = new Properties(null); props.Count().ShouldBe(0); }