public void GetQueryStringThrowsTest() { var parameters = new Dictionary <string, string>() { { "$x", "someValue" } }; Assert.Throws <ArgumentException>(() => MobileServiceTableUrlBuilder.GetQueryString(parameters)); }
public void GetQueryStringTest() { var parameters = new Dictionary <string, string>() { { "x", "$y" }, { "&hello", "?good bye" }, { "a$", "b" } }; Assert.AreEqual("x=%24y&%26hello=%3Fgood%20bye&a%24=b", MobileServiceTableUrlBuilder.GetQueryString(parameters)); Assert.AreEqual(null, MobileServiceTableUrlBuilder.GetQueryString(null)); //Assert.AreEqual(null, MobileServiceTableUrlBuilder.GetQueryString(new Dictionary<string, string>())); }