Пример #1
0
        private void Initialize()
        {
            rgName = TestUtilities.GenerateName("sdktestrg");
            resourcesClient.ResourceGroups.CreateOrUpdate(rgName, new ResourceGroup {
                Location = this.location
            });

            clusterName            = TestUtilities.GenerateName("testcluster");
            databaseName           = TestUtilities.GenerateName("testdatabase");
            eventHubConnectionName = TestUtilities.GenerateName("eventhubConection");

            sku1 = new AzureSku(name: "D13_v2", capacity: 2);
            sku2 = new AzureSku(name: "D14_v2", capacity: 2);

            trustedExternalTenants = new List <TrustedExternalTenant>(1)
            {
                new TrustedExternalTenant(this.tenantId)
            };

            hotCachePeriod1   = TimeSpan.FromDays(2);
            softDeletePeriod1 = TimeSpan.FromDays(4);

            hotCachePeriod2   = TimeSpan.FromDays(3);
            softDeletePeriod2 = TimeSpan.FromDays(6);
            dataFormat        = "CSV";

            cluster            = new Cluster(sku: new AzureSku(name: "D13_v2"), location: this.location, trustedExternalTenants: trustedExternalTenants);
            database           = new Database(location: this.location, softDeletePeriod: softDeletePeriod1, hotCachePeriod: hotCachePeriod1);
            eventhubConnection = new EventHubDataConnection(eventHubResourceId, consumerGroupName, location: this.location);

            databasePrincipal  = GetDatabasePrincipalList(dBprincipalMail, "Admin");
            databasePrincipals = new List <DatabasePrincipal> {
                databasePrincipal
            };
        }
Пример #2
0
 private void VerifyPrincipalsDontExist(IEnumerable <DatabasePrincipal> principals, DatabasePrincipal databasePrincipal)
 {
     Assert.Null(principals.FirstOrDefault(principal => principal.Email == databasePrincipal.Email));
 }
Пример #3
0
 private void VerifyPrincipalsExists(IEnumerable <DatabasePrincipal> principals, DatabasePrincipal databasePrincipal)
 {
     Assert.NotNull(principals.First(principal => principal.Email == databasePrincipal.Email));
 }