public async Task CreateShouldThrowExceptionIfSubscriptionIsInAnotherAccount() { ServiceTestContext testContext = new ServiceTestContext(); testContext.Subscriptions = new List <IAzureUserAccountSubscriptionContext> { ServiceTestContext.CreateSubscriptionContext(), ServiceTestContext.CreateSubscriptionContext(), }; testContext = CreateMocks(testContext); await Assert.ThrowsAsync <FirewallRuleException>(() => VerifyCreateAsync(testContext, testContext.ServerName, false)); }
public async Task CreateShouldFindTheRightSubscriptionGivenValidSubscriptionInSecondPlace() { ServiceTestContext testContext = new ServiceTestContext(); testContext.Subscriptions = new List <IAzureUserAccountSubscriptionContext> { ServiceTestContext.CreateSubscriptionContext(), testContext.ValidSubscription, ServiceTestContext.CreateSubscriptionContext(), }; testContext.Initialize(); testContext = CreateMocks(testContext); await VerifyCreateAsync(testContext, testContext.ServerName); }