本文整理汇总了C#中Stormpath.SDK.Tests.Common.Integration.TestClientProvider类的典型用法代码示例。如果您正苦于以下问题:C# TestClientProvider类的具体用法?C# TestClientProvider怎么用?C# TestClientProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestClientProvider类属于Stormpath.SDK.Tests.Common.Integration命名空间,在下文中一共展示了TestClientProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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();
}
示例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 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);
}
示例8: 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);
}
示例9: Getting_directory_groups
public async Task Getting_directory_groups(TestClientProvider clientBuilder)
{
var client = clientBuilder.GetClient();
var directory = await client.GetResourceAsync<IDirectory>(this.fixture.PrimaryDirectoryHref);
var groups = await directory.GetGroups().ToListAsync();
groups.Count.ShouldBeGreaterThan(0);
}
示例10: 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();
}
示例11: Getting_tenant_groups
public void Getting_tenant_groups(TestClientProvider clientBuilder)
{
var client = clientBuilder.GetClient();
var tenant = client.GetCurrentTenant();
var groups = tenant.GetGroups().Synchronously().ToList();
groups.Count.ShouldBeGreaterThan(0);
}
示例12: 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);
}
示例13: 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);
}
示例14: Getting_application_groups
public async Task Getting_application_groups(TestClientProvider clientBuilder)
{
var client = clientBuilder.GetClient();
var app = await client.GetResourceAsync<IApplication>(this.fixture.PrimaryApplicationHref);
var groups = await app.GetGroups().ToListAsync();
groups.Count.ShouldBeGreaterThan(0);
}
示例15: 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);
}