public void InvalidRoutesShouldThrow(SomeCommand command) { var httpRouteExtractor = new HttpRouteExtractor(AppDomainScanner.ScanForAllTypes); Action action = () => httpRouteExtractor.ExtractHttpRoute(command); action.ShouldThrow <PayloadRoutingException>(); }
public void ValidRoutesShouldResolve(SomeCommand command, string expected) { var httpRouteExtractor = new HttpRouteExtractor(AppDomainScanner.ScanForAllTypes); var httpRoute = httpRouteExtractor.ExtractHttpRoute(command); httpRoute.Should().Be(expected); }
public void TheHttpMethodShouldBeCorrect() { var httpRouteExtractor = new HttpRouteExtractor(AppDomainScanner.ScanForAllTypes); var request = new SomeRequest(); var httpMethod = httpRouteExtractor.ExtractHttpMethod(request); httpMethod.Should().Be(System.Net.Http.HttpMethod.Get); }
private static async Task <IOctopusAsyncClient> Create(OctopusServerEndpoint serverEndpoint, OctopusClientOptions options, bool addHandler, string requestingTool = null) { var httpRouteExtractor = new HttpRouteExtractor(options.ScanForHttpRouteTypes); var client = new OctopusAsyncClient(serverEndpoint, options, addHandler, requestingTool, httpRouteExtractor); // User used to see this exception // System.PlatformNotSupportedException: The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend await client.Repository.LoadRootDocument().ConfigureAwait(false); return(client); }