public void BindingReturnsGeneratedUri() { var baseUri = new Uri("http://localhost"); var variableValues = new NameValueCollection().With("state", "washington").With("City", "seattle"); var bindByName = new UriTemplate("weather#{state}/{city}/").BindByName(baseUri, variableValues).ToString(); bindByName .ShouldBe("http://localhost/weather#washington/seattle/"); bindByName = new UriTemplate("weather/#{state}/{city}/").BindByName(baseUri, variableValues).ToString(); bindByName .ShouldBe("http://localhost/weather/#washington/seattle/"); bindByName = new UriTemplate("weather/#/{state}/{city}/").BindByName(baseUri, variableValues).ToString(); bindByName .ShouldBe("http://localhost/weather/#/washington/seattle/"); }