public void QueryString_Works() { const string expectedQueryName = "test"; const string expectedQueryValue = "test"; var instance = new CallbackUrl(ExpectedUrl); var instance2 = instance.AddQueryString(expectedQueryName, expectedQueryValue); var uri = new Uri(instance2.Url); var query = uri.Query; Assert.IsNotNull(query); Assert.IsTrue(query.Contains($"{expectedQueryName}={expectedQueryValue}")); }
public void QueryString_Works() { const string expectedQueryName = "test"; const string expectedQueryValue = "test"; var instance = new CallbackUrl(ExpectedUrl); var instance2 = instance.AddQueryString("test", "test"); var uri = new Uri(instance2.Url); var query = QueryHelpers.ParseQuery(uri.Query); Assert.IsNotNull(query); Assert.IsTrue(query.ContainsKey(expectedQueryName)); Assert.AreEqual(expectedQueryValue, (string)query[expectedQueryName]); }