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

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

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

            builder.AppendFragment("foo/bar");

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

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

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

            builder.AppendFragment(path);

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

            builder.AppendFragment("foo/bar");

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

            builder.AppendFragment("foo/bar");

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