예제 #1
0
 public Task AddEndpointAsync(string endpointName, string regionId, string product, string domain,
                              bool isNeverExpire,
                              CancellationToken cancellationToken)
 {
     EndpointUserConfig.AddEndpoint(product, regionId, domain);
     return(endpointResolve.AddEndpointAsync(endpointName, regionId, product, domain, isNeverExpire, cancellationToken));
 }
예제 #2
0
        public void TestAddEndpointWithNullParam()
        {
            string productId = "mock_product_id";
            string regionId  = "mock_region_id";

            EndpointUserConfig.AddEndpoint(productId, regionId, null);
            ProductDomain productDomain = EndpointUserConfig.GetProductDomain(productId, regionId);

            Assert.Null(productDomain);
        }
예제 #3
0
        public void TestAddEndpoint()
        {
            string productId = "product_id";
            string regionId  = "region_id";
            string domain    = "mock_domain";

            EndpointUserConfig.AddEndpoint(productId, regionId, domain);
            ProductDomain productDomain = EndpointUserConfig.GetProductDomain(productId, regionId);

            Assert.Equal(domain, productDomain.DomainName);
            Assert.Equal(productId, productDomain.ProductName);
        }
예제 #4
0
 public void AddEndpoint(string endpointName, string regionId, string product, string domain,
                         bool isNeverExpire = false)
 {
     EndpointUserConfig.AddEndpoint(product, regionId, domain);
     endpointResolve.AddEndpoint(endpointName, regionId, product, domain, isNeverExpire);
 }