예제 #1
0
        public void SubscriptionNameShouldReturnNullGivenNullSubscription()
        {
            AzureSubscriptionContext subscriptionContext = new AzureSubscriptionContext(null);

            Assert.True(subscriptionContext.SubscriptionName == String.Empty);
            Assert.True(subscriptionContext.Subscription == null);
        }
예제 #2
0
        public void SubscriptionNameShouldReturnCorrectValueGivenValidSubscription()
        {
            string name     = Guid.NewGuid().ToString();
            string tenantId = Guid.NewGuid().ToString();
            AzureSubscriptionContext subscriptionContext = new AzureSubscriptionContext(new AzureSubscriptionIdentifier(null, null, name, null));

            Assert.True(subscriptionContext.SubscriptionName == name);
            Assert.True(subscriptionContext.Subscription != null);
        }