Ejemplo n.º 1
0
 private void SetupManagementClients(MockContext context)
 {
     ResourceManagementClient = GetResourceManagementClient(context);
     MapsClient = GetMapsManagementClient(context);
     _helper.SetupManagementClients(
         ResourceManagementClient,
         MapsClient);
 }
Ejemplo n.º 2
0
        public static string CreateDefaultMapsAccount(MapsManagementClient mapsManagementClient, string rgname)
        {
            var accountName = TestUtilities.GenerateName("maps");
            var parameters  = GetDefaultMapsAccountParameters();
            var newAccount  = mapsManagementClient.Accounts.CreateOrUpdate(rgname, accountName, parameters);

            VerifyAccountProperties(newAccount, true);

            return(accountName);
        }
Ejemplo n.º 3
0
        public static MapsManagementClient GetMapsManagementClient(MockContext context, RecordedDelegatingHandler handler)
        {
            MapsManagementClient mapsClient;

            if (IsTestTenant)
            {
                mapsClient = new MapsManagementClient(new TokenCredentials("xyz"), GetHandler())
                {
                    SubscriptionId = TestSubscription,
                    BaseUri        = TestUri
                };
            }
            else
            {
                handler.IsPassThrough = true;
                mapsClient            = context.GetServiceClient <MapsManagementClient>(handlers: handler);
            }
            return(mapsClient);
        }