Clear() public method

public Clear ( ) : void
return void
Exemplo n.º 1
0
        public void TestCreateStorageServiceWithPublish()
        {
            RemoveDeployments();

            clientMocks.ComputeManagementClientMock.Setup(
                c =>
                c.HostedServices.CreateAsync(It.IsAny <HostedServiceCreateParameters>(), It.IsAny <CancellationToken>()))
            .Returns(Tasks.FromResult(new OperationResponse
            {
                RequestId  = "request001",
                StatusCode = HttpStatusCode.OK
            }));

            storageService.Clear();

            using (var files = new FileSystemHelper(this)
            {
                EnableMonitoring = true
            })
            {
                // Setup
                string rootPath = files.CreateNewService(serviceName);
                files.CreateAzureSdkDirectoryAndImportPublishSettings();
                var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services"));
                cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath);

                ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService(location: "West US"));

                clientMocks.StorageManagementClientMock.Verify(c => c.StorageAccounts.CreateAsync(It.IsAny <StorageAccountCreateParameters>(), It.IsAny <CancellationToken>()), Times.Once);
            }
        }