public void Should_build_url_from_options_with_base_path(string url) { var sut = new UrlGenerator(Options.Create(new UrlOptions { BaseUrl = url, BasePath = "base" })); Assert.Equal("http://squidex.io/base", sut.BuildUrl()); Assert.Equal("http://squidex.io/base", sut.BuildUrl("/", false)); Assert.Equal("http://squidex.io/base", sut.BuildCallbackUrl("/", false)); Assert.Equal("http://squidex.io/base/", sut.BuildUrl("/", true)); Assert.Equal("http://squidex.io/base/", sut.BuildCallbackUrl("/", true)); Assert.Equal("http://squidex.io/base/path", sut.BuildUrl("/path", false)); Assert.Equal("http://squidex.io/base/path", sut.BuildUrl("/path/", false)); Assert.Equal("http://squidex.io/base/path/", sut.BuildUrl("/path", true)); Assert.Equal("http://squidex.io/base/path/", sut.BuildUrl("/path/", true)); }