Ejemplo n.º 1
0
            public void AppendsBasepathAndTypeBasepath()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator("thing", typeof(TypeWithBasePath)).ShouldBe("thing/with");
            }
Ejemplo n.º 2
0
            public void DoesNotDuplicateForwardSlashesWhenAppending()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator("/thing/", typeof(TypeWithBasePath)).ShouldBe("/thing/with");
            }
Ejemplo n.º 3
0
            public void ReturnsAttributeBasepathWhenBasepathIsEmpty()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator(string.Empty, typeof(TypeWithBasePath)).ShouldBe("/with");
            }
Ejemplo n.º 4
0
            public void ReturnsBasepathWithForwardSlashes()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator("/thing/", typeof(MethodsToScan)).ShouldBe("/thing/");
            }
Ejemplo n.º 5
0
            public void ReturnsBasepathWhenTypeHasNoAttribute()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator("thing", typeof(MethodsToScan)).ShouldBe("thing");
            }
Ejemplo n.º 6
0
            public void ReturnsEmptyStringWhenAttributeHasNoBasepathAndBasepathIsEmpty()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator(string.Empty, typeof(TypeWithoutBasePath)).ShouldBe("");
            }
Ejemplo n.º 7
0
            public void ReturnsEmptyStringWhenBasepathIsEmpty()
            {
                var scanner = new RouteScanner();

                scanner.BasePathGenerator(string.Empty, typeof(MethodsToScan)).ShouldBe("");
            }