public void get_keys_from_dictionary() { var values = new Dictionary<string, string> { { "a", "1" }, { "b", "2" }, {"c", "3"} }; var headers = new DictionaryHeaders(values); headers.Keys().ShouldHaveTheSameElementsAs("a", "b", "c"); }
public void dictionary_has() { var values = new Dictionary<string, string> { { "a", "1" }, { "b", "2" } }; var headers = new DictionaryHeaders(values); headers.Has("a").ShouldBeTrue(); headers.Has("c").ShouldBeFalse(); }
public void get_and_set_with_dictionary() { var values = new Dictionary<string, string>{{"a", "1"}, {"b", "2"}}; var headers = new DictionaryHeaders(values); headers["a"].ShouldEqual("1"); headers["b"].ShouldEqual("2"); headers["c"] = "3"; values["c"].ShouldEqual("3"); }
public void to_name_values_for_dictionary() { var values = new Dictionary<string, string> { { "a", "1" }, { "b", "2" } }; var headers = new DictionaryHeaders(values); var collection = headers.ToNameValues(); collection["a"].ShouldEqual("1"); collection["b"].ShouldEqual("2"); }