當前位置: 首頁>>代碼示例>>C#>>正文


C# TestClientProvider.GetClient方法代碼示例

本文整理匯總了C#中Stormpath.SDK.Tests.Common.Integration.TestClientProvider.GetClient方法的典型用法代碼示例。如果您正苦於以下問題:C# TestClientProvider.GetClient方法的具體用法?C# TestClientProvider.GetClient怎麽用?C# TestClientProvider.GetClient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Stormpath.SDK.Tests.Common.Integration.TestClientProvider的用法示例。


在下文中一共展示了TestClientProvider.GetClient方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Getting_organization_groups

        public void Getting_organization_groups(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var org = client.GetResource<IOrganization>(this.fixture.PrimaryOrganizationHref);

            org.GetGroups().Synchronously().Count().ShouldBeGreaterThan(0);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:7,代碼來源:Organization_tests.cs

示例2: Creating_application_without_directory

        public async Task Creating_application_without_directory(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var newApplicationName = $".NET IT {this.fixture.TestRunIdentifier} Application #2";
            var createdApplication = await tenant.CreateApplicationAsync(newApplicationName, createDirectory: false);

            createdApplication.Href.ShouldNotBeNullOrEmpty();
            this.fixture.CreatedApplicationHrefs.Add(createdApplication.Href);
            createdApplication.Name.ShouldBe(newApplicationName);
            createdApplication.Status.ShouldBe(ApplicationStatus.Enabled);

            var defaultAccountStore = await createdApplication.GetDefaultAccountStoreAsync();
            if (!string.IsNullOrEmpty(defaultAccountStore?.Href))
            {
                this.fixture.CreatedDirectoryHrefs.Add(defaultAccountStore.Href);
            }

            defaultAccountStore.ShouldBeNull(); // no auto-created directory = no default account store

            // Clean up
            (await createdApplication.DeleteAsync()).ShouldBeTrue();
            this.fixture.CreatedApplicationHrefs.Remove(createdApplication.Href);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:25,代碼來源:Application_tests.cs

示例3: Getting_organization_groups

        public async Task Getting_organization_groups(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var org = await client.GetResourceAsync<IOrganization>(this.fixture.PrimaryOrganizationHref);

            (await org.GetGroups().CountAsync()).ShouldBeGreaterThan(0);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:7,代碼來源:Organization_tests.cs

示例4: Getting_directory_applications

        public async Task Getting_directory_applications(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var directory = await client.GetDirectoryAsync(this.fixture.PrimaryDirectoryHref);

            var apps = await directory.GetApplications().ToListAsync();
            apps.Where(x => x.Href == this.fixture.PrimaryApplicationHref).Any().ShouldBeTrue();
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Directory_tests.cs

示例5: Getting_tenant_directories

        public async Task Getting_tenant_directories(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();
            var directories = await tenant.GetDirectories().ToListAsync();

            directories.Count.ShouldNotBe(0);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Directory_tests.cs

示例6: Getting_directory_applications

        public void Getting_directory_applications(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var directory = client.GetDirectory(this.fixture.PrimaryDirectoryHref);

            var apps = directory.GetApplications().Synchronously().ToList();
            apps.Where(x => x.Href == this.fixture.PrimaryApplicationHref).Any().ShouldBeTrue();
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Directory_tests.cs

示例7: Getting_tenant_directories

        public void Getting_tenant_directories(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();
            var directories = tenant.GetDirectories().Synchronously().ToList();

            directories.Count.ShouldNotBe(0);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Directory_tests.cs

示例8: Getting_group_applications

        public async Task Getting_group_applications(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var group = await client.GetGroupAsync(this.fixture.PrimaryGroupHref);

            var apps = await group.GetApplications().ToListAsync();
            apps.Where(x => x.Href == this.fixture.PrimaryApplicationHref).Any().ShouldBeTrue();
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Group_tests.cs

示例9: Getting_application_groups

        public void Getting_application_groups(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var app = client.GetResource<IApplication>(this.fixture.PrimaryApplicationHref);
            var groups = app.GetGroups().Synchronously().ToList();

            groups.Count.ShouldBeGreaterThan(0);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Group_tests.cs

示例10: Getting_group

        public async Task Getting_group(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var group = await tenant.GetGroupAsync(this.fixture.PrimaryGroupHref);
            group.Href.ShouldBe(this.fixture.PrimaryGroupHref);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Tenant_tests.cs

示例11: Getting_directory

        public void Getting_directory(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();

            var directory = tenant.GetDirectory(this.fixture.PrimaryDirectoryHref);
            directory.Href.ShouldBe(this.fixture.PrimaryDirectoryHref);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Tenant_tests.cs

示例12: Getting_group

        public void Getting_group(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();

            var group = tenant.GetGroup(this.fixture.PrimaryGroupHref);
            group.Href.ShouldBe(this.fixture.PrimaryGroupHref);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Tenant_tests.cs

示例13: Getting_directory

        public async Task Getting_directory(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var directory = await tenant.GetDirectoryAsync(this.fixture.PrimaryDirectoryHref);
            directory.Href.ShouldBe(this.fixture.PrimaryDirectoryHref);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Tenant_tests.cs

示例14: Getting_tenant_organizations

        public async Task Getting_tenant_organizations(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();
            var orgs = await tenant.GetOrganizations().ToListAsync();

            orgs.Count.ShouldBeGreaterThan(0);
        }
開發者ID:jwynia,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Organization_tests.cs

示例15: Getting_tenant_organizations

        public void Getting_tenant_organizations(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();
            var orgs = tenant.GetOrganizations().Synchronously().ToList();

            orgs.Count.ShouldBeGreaterThan(0);
        }
開發者ID:ssankar1234,項目名稱:stormpath-sdk-dotnet,代碼行數:8,代碼來源:Organization_tests.cs


注:本文中的Stormpath.SDK.Tests.Common.Integration.TestClientProvider.GetClient方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。