Пример #1
0
        public async Task EnumerateSitesWithDelegatedPermissionsViaSharePointAdminCenter()
        {
            //TestCommon.Instance.Mocking = false;
            TestCommon.Instance.UseApplicationPermissions = false;
            using (var context = await TestCommon.Instance.GetContextAsync(TestCommon.TestSite))
            {
                var sites = await SiteCollectionEnumerator.GetViaTenantAdminHiddenListAsync(context);

                VerifySite(sites, context);
            }
        }
Пример #2
0
        public async Task EnumerateSitesWithDelegatedPermissionsViaSearchApi()
        {
            //TestCommon.Instance.Mocking = false;
            TestCommon.Instance.UseApplicationPermissions = false;
            using (var context = await TestCommon.Instance.GetContextAsync(TestCommon.TestSite))
            {
                var sites = await SiteCollectionEnumerator.GetViaGraphSearchApiAsync(context);

                VerifySite(sites, context);
            }
        }
Пример #3
0
        public async Task EnumerateSitesWithDetails()
        {
            //TestCommon.Instance.Mocking = false;
            TestCommon.Instance.UseApplicationPermissions = false;
            using (var context = await TestCommon.Instance.GetContextAsync(TestCommon.TestSite))
            {
                var sites = await SiteCollectionEnumerator.GetWithDetailsViaTenantAdminHiddenListAsync(context);

                Assert.IsTrue(sites.Count > 0);
                var myTestSite = sites.FirstOrDefault(p => p.Id == context.Site.Id);
                Assert.IsTrue(myTestSite != null);
                Assert.IsTrue(myTestSite.RootWebId == context.Web.Id);
                Assert.IsTrue(!string.IsNullOrEmpty(myTestSite.Name));
                Assert.IsTrue(!string.IsNullOrEmpty(myTestSite.CreatedBy));
                Assert.IsTrue(myTestSite.TimeCreated > DateTime.MinValue);
                Assert.IsTrue(myTestSite.StorageQuota > 0);
                Assert.IsTrue(myTestSite.StorageUsed > 0);
                Assert.IsTrue(!string.IsNullOrEmpty(myTestSite.TemplateName));
            }
        }