示例#1
0
        public void should_return_path_if_no_tilde_is_found()
        {
            var somePath = "some-path";

            DiagnosticsUrls
            .ToRelativeUrl(somePath).ShouldEqual(somePath);
        }
示例#2
0
        public void should_return_path_if_invalid_prefix_is_specified()
        {
            var invalidPrefixedPath = "~some-path";

            DiagnosticsUrls
            .ToRelativeUrl(invalidPrefixedPath).ShouldEqual(invalidPrefixedPath);
        }
示例#3
0
 public void should_not_have_trailing_slash_for_root_route()
 {
     DiagnosticsUrls
     .ToRelativeUrl("~/")
     .EndsWith("/")
     .ShouldBeFalse();
 }
示例#4
0
 public void should_return_null_if_path_is_null_or_empty()
 {
     DiagnosticsUrls
     .ToRelativeUrl(null)
     .ShouldBeNull();
 }
示例#5
0
 public void should_return_relative_path_when_prefix_is_found()
 {
     DiagnosticsUrls
     .ToRelativeUrl("~/some-path")
     .ShouldEqual("{0}/some-path".ToFormat(DiagnosticsUrls.ROOT));
 }