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);
        }
        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);
        }
        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);
        }
        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);
        }
        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();
        }
        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();
        }
        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);
        }
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        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();
        }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
        public void Getting_group_applications(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var group = client.GetGroup(this.fixture.PrimaryGroupHref);

            var apps = group.GetApplications().Synchronously().ToList();
            apps.Where(x => x.Href == this.fixture.PrimaryApplicationHref).Any().ShouldBeTrue();
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
        public void Getting_directory_groups(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var directory = client.GetResource<IDirectory>(this.fixture.PrimaryDirectoryHref);
            var groups = directory.GetGroups().Synchronously().ToList();

            groups.Count.ShouldBeGreaterThan(0);
        }
        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);
        }
Exemplo n.º 16
0
        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);
        }
        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);
        }
Exemplo n.º 18
0
        public async Task Getting_tenant_groups(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();
            var groups = await tenant.GetGroups().ToListAsync();

            groups.Count.ShouldBeGreaterThan(0);
        }
        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);
        }
Exemplo n.º 20
0
        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);
        }
Exemplo n.º 21
0
        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);
        }
Exemplo n.º 22
0
        public void Getting_group_tenant(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var group = client.GetResource<IGroup>(this.fixture.PrimaryGroupHref);

            // Verify data from IntegrationTestData
            var tenantHref = group.GetTenant().Href;
            tenantHref.ShouldBe(this.fixture.TenantHref);
        }
Exemplo n.º 23
0
        public async Task Getting_application(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var app = await tenant.GetApplicationAsync(this.fixture.PrimaryApplicationHref);
            app.Href.ShouldBe(this.fixture.PrimaryApplicationHref);
            app.Description.ShouldBe("The Battle of Endor");
        }
Exemplo n.º 24
0
        public async Task Getting_account(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var account = await tenant.GetAccountAsync(this.fixture.PrimaryAccountHref);
            account.Href.ShouldBe(this.fixture.PrimaryAccountHref);
            account.FullName.ShouldBe("Luke Skywalker");
        }
Exemplo n.º 25
0
        public async Task Getting_current_tenant(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            tenant.ShouldNotBe(null);
            tenant.Href.ShouldNotBe(null);
            tenant.Name.ShouldNotBe(null);
        }
        public void Getting_tenant_accounts(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();

            var accounts = tenant.GetAccounts().Synchronously().ToList();

            accounts.Any().ShouldBeTrue();
        }
        public async Task Getting_application_tenant(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var application = await client.GetResourceAsync<IApplication>(this.fixture.PrimaryApplicationHref);

            // Verify data from IntegrationTestData
            var tenantHref = (await application.GetTenantAsync()).Href;
            tenantHref.ShouldBe(this.fixture.TenantHref);
        }
        public void Getting_current_tenant(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = client.GetCurrentTenant();

            tenant.ShouldNotBe(null);
            tenant.Href.ShouldNotBe(null);
            tenant.Name.ShouldNotBe(null);
        }
        public async Task Getting_tenant_accounts(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var tenant = await client.GetCurrentTenantAsync();

            var accounts = await tenant.GetAccounts().ToListAsync();

            accounts.Any().ShouldBeTrue();
        }
        public void Getting_organization_tenant(TestClientProvider clientBuilder)
        {
            var client = clientBuilder.GetClient();
            var org = client.GetResource<IOrganization>(this.fixture.PrimaryOrganizationHref);

            // Verify data from IntegrationTestData
            var tenantHref = org.GetTenant().Href;
            tenantHref.ShouldBe(this.fixture.TenantHref);
        }