public async Task CanDescribeSecureSiteServices(string rootUrl, string username, string password)
        {
            var gateway      = new PortalGateway(rootUrl, username, password);
            var siteResponse = await IntegrationTestFixture.TestPolicy.Execute(() =>
            {
                return(gateway.DescribeSite());
            });

            Assert.NotNull(siteResponse);
            Assert.True(siteResponse.Version > 0);

            var filteredSite = new SiteDescription
            {
                Resources = siteResponse.Resources.Where(x => !x.Path.ToLowerInvariant().Contains("utilities")).ToList()
            };

            var response = await IntegrationTestFixture.TestPolicy.Execute(() =>
            {
                return(gateway.DescribeServices(filteredSite));
            });

            foreach (var serviceDescription in response)
            {
                Assert.NotNull(serviceDescription);
                Assert.Null(serviceDescription.Error);
                Assert.NotNull(serviceDescription.ServiceDescription);
            }
        }
Esempio n. 2
0
        public async Task CanDescribeSiteServices(string rootUrl)
        {
            var gateway      = new PortalGateway(rootUrl);
            var siteResponse = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.DescribeSite());
            });

            Assert.NotNull(siteResponse);
            Assert.True(siteResponse.Version > 0);

            var response = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.DescribeServices(siteResponse));
            });

            foreach (var serviceDescription in response)
            {
                Assert.NotNull(serviceDescription);
                Assert.Null(serviceDescription.Error);
                Assert.NotNull(serviceDescription.ServiceDescription);
            }
        }