public void DictionaryToParameterString_EmptyDictionary_EmptyString() { Dictionary <string, string> dict = new Dictionary <string, string>(); string result = UriUtils.DictionaryToParameterString(dict); Assert.AreEqual("", result); }
public void DictionaryToParameterString_OneEntry_ReturnsKeyValue() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("hello", "world"); string result = UriUtils.DictionaryToParameterString(dict); Assert.AreEqual("hello=world", result); }
public void DictionaryToParameterString_MultipleEntries_SplitByAnd() { Dictionary <string, int> dict = new Dictionary <string, int>(); dict.Add("one", 1); dict.Add("two", 2); string result = UriUtils.DictionaryToParameterString(dict); Assert.AreEqual("one=1&two=2", result); }