public void ExportTemplateImage() { List <TrackingResult> trackingIds = null; ExportAzureRemoteAppTemplateImage mockCmdlet = SetUpTestCommon <ExportAzureRemoteAppTemplateImage>(); // Required parameters for this test mockCmdlet.CollectionName = collectionName; mockCmdlet.DestinationStorageAccountName = storageAccountName; mockCmdlet.DestinationStorageAccountKey = storageAccountKey; mockCmdlet.DestinationStorageAccountContainerName = containerName; // Setup the environment for testing this cmdlet MockObject.SetUpDefaultRemoteAppExportTemplateImage(remoteAppManagementClientMock, mockCmdlet.CollectionName, mockCmdlet.DestinationStorageAccountName, mockCmdlet.DestinationStorageAccountKey, mockCmdlet.DestinationStorageAccountContainerName, trackingId); mockCmdlet.ResetPipelines(); Log("Calling Export-AzureRemoteAppTemplateImage"); mockCmdlet.ExecuteCmdlet(); if (mockCmdlet.runTime().ErrorStream.Count != 0) { Assert.True(false, String.Format("Export-AzureRemoteAppTemplateImage returned the following error {0}", mockCmdlet.runTime().ErrorStream[0].Exception.Message ) ); } trackingIds = MockObject.ConvertList <TrackingResult>(mockCmdlet.runTime().OutputPipeline); Assert.NotNull(trackingIds); Log("The test for Export-AzureRemoteAppTemplateImage completed successfully"); }