Ejemplo n.º 1
0
        public void Can_Get_QueryString_From_Hashtable()
        {
            // Arrange
            Hashtable hashtable = new Hashtable();
            hashtable.Add("key1", "value1");
            hashtable.Add("key2", "value2");
            hashtable.Add("key3", "value3");

            // Act
            var queryString = hashtable.ToQueryString();

            // Assert
            Assert.IsNotNull(queryString);
            Assert.IsInstanceOfType(queryString, typeof(string));
            Assert.IsTrue(queryString.Contains("key1=value1"));
            Assert.IsTrue(queryString.Contains("key2=value2"));
            Assert.IsTrue(queryString.Contains("key3=value3"));
        }