Exemplo n.º 1
0
        public void GetQueryParameter_ShouldReturnMatchForSingleParameter()
        {
            var uri = new Uri("http://www.foo.bar/index.htm?foo=bar");
            var result = uri.GetQueryParameter("foo");

            Assert.That(result, Is.EqualTo("bar"));
        }
Exemplo n.º 2
0
        public void GetQueryParameter_ShouldHandleBrokenParameter()
        {
            var uri = new Uri("http://www.foo.bar/index.htm?foo");
            var result = uri.GetQueryParameter("foo");

            Assert.That(result, Is.EqualTo(string.Empty));
        }
Exemplo n.º 3
0
        public void GetQueryParameter_ShouldReturnNullForNoParameters()
        {
            var uri = new Uri("http://www.foo.bar/index.htm");
            var result = uri.GetQueryParameter("foo");

            Assert.That(result, Is.EqualTo(string.Empty));
        }