public void CanListApiAppsInSubscription()
 {
     UndoCtx.Start();
     using (var client = GetArmClient <ApiAppManagementClient>())
     {
         var response = client.ApiApps.ListAll();
         // Can't assert any more really in this test until we get deployment
         // working so we know what to look for. Results depend on what's
         // currently deployed in the subscription.
         Assert.Equal(HttpStatusCode.OK, response.StatusCode);
     }
 }
Esempio n. 2
0
        public void CanGetTemplateMetadataForPackageWithNoDependencies()
        {
            UndoCtx.Start();
            WithNewGroup <ApiAppManagementClient>((groupName, client) =>
            {
                var response = client.Templates.GetMetadata(new GetDeploymentMetadataRequest()
                {
                    MicroserviceId    = "Microsoft.Azure.AppService.ApiApps.TestBench",
                    ResourceGroupName = groupName
                });

                var metadata = response.Metadata;
                Assert.Equal("Microsoft.Azure.AppService.ApiApps.TestBench", metadata.MicroserviceId);
                Assert.Equal(0, metadata.DependsOn.Count);
                Assert.Equal(0, metadata.Parameters.Count);
            });
        }
Esempio n. 3
0
        public void CanGetTemplateMetadataForPackageWithParameters()
        {
            UndoCtx.Start();

            WithNewGroup <ApiAppManagementClient>((groupName, client) =>
            {
                var response = client.Templates.GetMetadata(new GetDeploymentMetadataRequest
                {
                    MicroserviceId    = "SalesforceConnector",
                    ResourceGroupName = groupName
                });
                var metadata = response.Metadata;
                Assert.Equal("SalesforceConnector", metadata.MicroserviceId);
                Assert.Equal(1, metadata.Parameters.Count);
                Assert.Equal("salesforceentities", metadata.Parameters[0].Name);
            });
        }