private void SetMocks(List<WindowsAzure.Subscriptions.Models.SubscriptionListOperationResponse.Subscription> rdfeSubscriptions,
            List<Azure.Subscriptions.Models.Subscription> csmSubscriptions)
        {
            ClientMocks clientMocks = new ClientMocks(new Guid(defaultSubscription));

            clientMocks.LoadRdfeSubscriptions(rdfeSubscriptions);
            clientMocks.LoadCsmSubscriptions(csmSubscriptions);

            AzureSession.ClientFactory = new MockClientFactory(new object[] { clientMocks.RdfeSubscriptionClientMock.Object,
                clientMocks.CsmSubscriptionClientMock.Object });

            AzureSession.AuthenticationFactory = new MockAuthenticationFactory();
        }
        private void SetMocks(List<RDFESubscription> rdfeSubscriptions,
            List<CSMSubscription> csmSubscriptions,
            List<TenantIdDescription> tenants = null,
            Func<AzureAccount, AzureEnvironment, string, IAccessToken> tokenProvider = null)
        {
            ClientMocks clientMocks = new ClientMocks(new Guid(defaultSubscription));

            clientMocks.LoadRdfeSubscriptions(rdfeSubscriptions);
            clientMocks.LoadCsmSubscriptions(csmSubscriptions);
            clientMocks.LoadTenants(tenants);

            AzureSession.ClientFactory = new MockClientFactory(new object[] { clientMocks.RdfeSubscriptionClientMock.Object,
                clientMocks.CsmSubscriptionClientMock.Object })
            {
                MoqClients = true
            };

            var mockFactory = new MockTokenAuthenticationFactory();
            if (tokenProvider != null)
            {
                mockFactory.TokenProvider = tokenProvider;
            }

            AzureSession.AuthenticationFactory = mockFactory;
        }