public static void TestClassInitialize(TestContext testContext) { Test.Info(string.Format("{0} Class Initialize", testContext.FullyQualifiedTestClassName)); Test.FullClassName = testContext.FullyQualifiedTestClassName; StorageAccount = GetCloudStorageAccountFromConfig(); //init the blob helper for blob related operations blobUtil = new CloudBlobUtil(StorageAccount); queueUtil = new CloudQueueUtil(StorageAccount); tableUtil = new CloudTableUtil(StorageAccount); // import module string moduleFilePath = Test.Data.Get("ModuleFilePath"); PowerShellAgent.ImportModule(moduleFilePath); //set the default storage context PowerShellAgent.SetStorageContext(StorageAccount.ToString(true)); random = new Random(); ContainerInitCount = blobUtil.GetExistingContainerCount(); QueueInitCount = queueUtil.GetExistingQueueCount(); TableInitCount = tableUtil.GetExistingTableCount(); }
public static void TestClassInitialize(TestContext testContext) { Test.Info(string.Format("{0} Class Initialize", testContext.FullyQualifiedTestClassName)); Test.FullClassName = testContext.FullyQualifiedTestClassName; //add the common initialization if (StorageAccount == null) { StorageAccount = GetCloudStorageAccountFromConfig(useHttps: useHttps); Test.Info("Got storage account from config: {0}", StorageAccount.ToString(true)); } //init the blob helper for blob related operations blobUtil = new CloudBlobUtil(StorageAccount); queueUtil = new CloudQueueUtil(StorageAccount); tableUtil = new CloudTableUtil(StorageAccount); fileUtil = new CloudFileUtil(StorageAccount); random = new Random(); SetCLIEnv(testContext); if (null == CommandAgent) { CommandAgent = AgentFactory.CreateAgent(testContext.Properties); } }