示例#1
0
        public void Setup()
        {
            AgentId                      = 1234567;
            MockSqlQueryHelper           = new Mock <ISqlQueryHelper>();
            MockAgentHelper              = new Mock <IAgentHelper>();
            MockLogger                   = new Mock <IAPILog>();
            MockArtifactQueries          = new Mock <IArtifactQueries>();
            RsapiApiOptions              = new APIOptions();
            MockRsapiRepositoryGroup     = new Mock <IRsapiRepositoryGroup>();
            MockAuthenticationHelper     = new Mock <IAuthenticationHelper>();
            MockSerializationHelper      = new Mock <ISerializationHelper>();
            WorkspaceResourceGroupIdList = new List <Int32>
            {
                10000,
                20000
            };

            Sut = new ExportWorkerJob(
                agentId: AgentID,
                agentHelper: MockAgentHelper.Object,
                sqlQueryHelper: MockSqlQueryHelper.Object,
                processedOnDateTime: DateTime.Now,
                resourceGroupIds: WorkspaceResourceGroupIdList,
                logger: MockLogger.Object,
                artifactQueries: MockArtifactQueries.Object,
                rsapiApiOptions: RsapiApiOptions,
                rsapiRepositoryGroup: MockRsapiRepositoryGroup.Object,
                authenticationHelper: MockAuthenticationHelper.Object,
                serializationHelper: MockSerializationHelper.Object);
        }
示例#2
0
 public void TearDown()
 {
     MockSqlQueryHelper           = null;
     MockAgentHelper              = null;
     MockLogger                   = null;
     MockArtifactQueries          = null;
     RsapiApiOptions              = null;
     MockRsapiRepositoryGroup     = null;
     MockAuthenticationHelper     = null;
     WorkspaceResourceGroupIdList = null;
     MockSerializationHelper      = null;
     Sut = null;
 }
示例#3
0
 public void TearDown()
 {
     MockQuery              = null;
     MockAgentHelper        = null;
     MockServiceManager     = null;
     MockArtifactQueries    = null;
     MockUtilityQueryHelper = null;
     MockErrorQueries       = null;
     MockExportFileCreator  = null;
     MockErrorQueries       = null;
     _resourceGroupIdList   = null;
     _exportWorkerJob       = null;
 }
示例#4
0
 public void Setup()
 {
     AgentId                = 1234567;
     MockQuery              = new Mock <IQuery>();
     MockAgentHelper        = new Mock <IAgentHelper>();
     MockServiceManager     = new Mock <IServicesMgr>();
     MockArtifactQueries    = new Mock <IArtifactQueries>();
     MockUtilityQueryHelper = new Mock <Helpers.Utility.IQuery>();
     MockExportFileCreator  = new Mock <IExportFileCreator>();
     MockErrorQueries       = new Mock <IErrorQueries>();
     _resourceGroupIdList   = new List <int> {
         10000, 20000
     };
     _exportWorkerJob = GetExportWorkerJob();
 }
示例#5
0
        private ExportWorkerJob GetExportWorkerJob()
        {
            var exportWorkerJob = new ExportWorkerJob(
                AgentId,
                MockServiceManager.Object,
                MockAgentHelper.Object,
                MockQuery.Object,
                MockArtifactQueries.Object,
                MockUtilityQueryHelper.Object,
                new DateTime(2016, 01, 25, 01, 00, 00),
                _resourceGroupIdList,
                MockExportFileCreator.Object,
                MockErrorQueries.Object);

            return(exportWorkerJob);
        }