public void FormatsPath()
        {
            var builder = new HttpUrlBuilder("http://localhost");

            builder.AppendPath("foo/{0}", "bar");

            Assert.Equal("/foo/bar", builder.ToUri().AbsolutePath);
        }
        public void DoesNotEncodeThePathSeperator()
        {
            var builder = new HttpUrlBuilder("http://localhost");

            builder.AppendPath("foo/bar");

            Assert.Equal("/foo/bar", builder.ToUri().AbsolutePath);
        }
        public void EncodesPathArguments()
        {
            var builder = new HttpUrlBuilder("http://localhost");

            builder.AppendPath("foo/{0}", "bar#bar");

            Assert.Equal("/foo/bar%23bar", builder.ToUri().AbsolutePath);
        }
        public void EncodesPath(string path, string expectedPath)
        {
            var builder = new HttpUrlBuilder("http://localhost");

            builder.AppendPath(path);

            Assert.Equal(expectedPath, builder.ToUri().AbsolutePath);
        }
        public void WhenNoExistingPath_SetsAbsolutePath(string url)
        {
            var builder = new HttpUrlBuilder(url);

            builder.AppendPath("foo/bar");

            Assert.Equal("/foo/bar", builder.ToUri().AbsolutePath);
        }
        public void AppendsPathToExisting(string url)
        {
            var builder = new HttpUrlBuilder(url);

            builder.AppendPath("foo/bar");

            Assert.Equal("/existing/path/foo/bar", builder.ToUri().AbsolutePath);
        }