public void RouteToCompatabilityWebServiceUri_WebProxyUser(string uriString, bool compatabilityWebServiceShouldBePrimary) { //Arrange _configuration.Setup(c => c.AutomaticRouteToCompatabilityWebServiceRegex).Returns(new Regex("")); _proxyRouting = new NasAvWebServicesRouting(_configuration.Object, _webProxyUserRepository.Object); var uri = new Uri(uriString); //Act var routing = _proxyRouting.GetRouting(uri, HttpMethod.Get, null, GetRequestContent(RoutedExternalSystemId), new RouteIdentifier()); //Assert routing.Routes.Count.Should().Be(2); routing.Routes[0].Uri.AbsoluteUri.Should().StartWith(NasAvWebServiceRootUriString); routing.Routes[0].IsPrimary.Should().Be(!compatabilityWebServiceShouldBePrimary); routing.Routes[1].Uri.AbsoluteUri.Should().StartWith(CompatabilityWebServiceRootUriString); routing.Routes[1].IsPrimary.Should().Be(compatabilityWebServiceShouldBePrimary); }
public void RootUrl() { //Arrange var uri = new Uri("http://localhost:23791"); //Act var routing = _proxyRouting.GetRouting(uri, HttpMethod.Get, null, null, new RouteIdentifier()); //Assert routing.Routes.Count.Should().Be(2); routing.Routes[0].Uri.AbsoluteUri.Should().Be(NasAvWebServiceRootUriString + "/"); routing.Routes[1].Uri.AbsoluteUri.Should().Be(CompatabilityWebServiceRootUriString + "/"); }