public void BaseSetup() { if (AzureSession.DataStore != null && !(AzureSession.DataStore is MemoryDataStore)) { AzureSession.DataStore = new MemoryDataStore(); } currentProfile = new AzureSMProfile(); if (currentProfile.Context.Subscription == null) { var newGuid = Guid.NewGuid(); var client = new ProfileClient(currentProfile); client.AddOrSetAccount(new AzureAccount { Id = "test", Type = AzureAccount.AccountType.User, Properties = new Dictionary<AzureAccount.Property, string> { {AzureAccount.Property.Subscriptions, newGuid.ToString()} } }); client.AddOrSetSubscription( new AzureSubscription { Id = newGuid, Name = "test", Environment = EnvironmentName.AzureCloud, Account = "test" }); client.SetSubscriptionAsDefault(newGuid, "test"); } AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); }