public void CannotResolveRegionWhenNoMatchingServices()
        {
            var expectedRegion = string.Empty;
            var catalog = new OpenStackServiceCatalog();
            catalog.Add(new OpenStackServiceDefinition("Test Service", "Test-Service",
                new List<OpenStackServiceEndpoint>()
                {
                    new OpenStackServiceEndpoint("http://other.endpoint.org", "Some Region" , "1.0",
                        "http://www.someplace.com", "http://www.someplace.com")
                }));

            catalog.Add(new OpenStackServiceDefinition("Other Test Service", "Test-Service",
                new List<OpenStackServiceEndpoint>()
                {
                    new OpenStackServiceEndpoint("http://other.endpoint.org", "some other region", "1.0",
                        "http://www.someplace.com", "http://www.someplace.com")
                }));
            var resolver = new OpenStackRegionResolver();
            var region = resolver.Resolve(new Uri("http://nomatching.endpoint.org/v2/tokens"), catalog, "No Matching Service");
            Assert.AreEqual(expectedRegion, region);
        }
        public void CannotResolveRegionWithNullEndpoint()
        {
            var catalog = new OpenStackServiceCatalog();

            var resolver = new OpenStackRegionResolver();
            resolver.Resolve(null, catalog, "Test Service");
        }
        public void CannotResolveRegionWithEmptyServiceName()
        {
            var catalog = new OpenStackServiceCatalog();

            var resolver = new OpenStackRegionResolver();
            resolver.Resolve(new Uri("http://other.endpoint.org/v2/tokens"), catalog, string.Empty);
        }
 public void CannotResolveRegionWithNullCatalog()
 {
     var resolver = new OpenStackRegionResolver();
     resolver.Resolve(new Uri("http://other.endpoint.org/v2/tokens"), null, "Test Service");
 }