本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}