public void Setup() { _exportFileCreator = new ExportFileCreator(); var exportJobName = GetRandomExportJobName(); //create temp export file _exportFullFilePath = _exportFileCreator.CreateExportFileAsync(exportJobName).Result; }
public ExportWorkerJob(int agentId, IServicesMgr serviceMgr, IAgentHelper agentHelper, IQuery queryHelper, IArtifactQueries artifactQueries, Helpers.Utility.IQuery utilityQueryHelper, DateTime processedOnDateTime, IEnumerable <int> resourceGroupIds, IExportFileCreator exportFileCreator, IErrorQueries errorQueries) { AgentId = agentId; _serviceMgr = serviceMgr; AgentHelper = agentHelper; QueryHelper = queryHelper; _artifactQueries = artifactQueries; _utilityQueryHelper = utilityQueryHelper; ProcessedOnDateTime = processedOnDateTime; AgentResourceGroupIds = resourceGroupIds; _exportFileCreator = exportFileCreator; ErrorQueries = errorQueries; RecordId = 0; WorkspaceArtifactId = -1; QueueTable = Constant.Tables.ExportWorkerQueue; }
public void Teardown() { //delete temp export file _exportFileCreator.DeleteExportFileAsync().Wait(); _exportFileCreator = null; }