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); }