public void AppendsBasepathAndTypeBasepath() { var scanner = new RouteScanner(); scanner.BasePathGenerator("thing", typeof(TypeWithBasePath)).ShouldBe("thing/with"); }
public void DoesNotDuplicateForwardSlashesWhenAppending() { var scanner = new RouteScanner(); scanner.BasePathGenerator("/thing/", typeof(TypeWithBasePath)).ShouldBe("/thing/with"); }
public void ReturnsAttributeBasepathWhenBasepathIsEmpty() { var scanner = new RouteScanner(); scanner.BasePathGenerator(string.Empty, typeof(TypeWithBasePath)).ShouldBe("/with"); }
public void ReturnsBasepathWithForwardSlashes() { var scanner = new RouteScanner(); scanner.BasePathGenerator("/thing/", typeof(MethodsToScan)).ShouldBe("/thing/"); }
public void ReturnsBasepathWhenTypeHasNoAttribute() { var scanner = new RouteScanner(); scanner.BasePathGenerator("thing", typeof(MethodsToScan)).ShouldBe("thing"); }
public void ReturnsEmptyStringWhenAttributeHasNoBasepathAndBasepathIsEmpty() { var scanner = new RouteScanner(); scanner.BasePathGenerator(string.Empty, typeof(TypeWithoutBasePath)).ShouldBe(""); }
public void ReturnsEmptyStringWhenBasepathIsEmpty() { var scanner = new RouteScanner(); scanner.BasePathGenerator(string.Empty, typeof(MethodsToScan)).ShouldBe(""); }