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