Пример #1
0
        public void GetNewJobDefinitionsWiki()
        {
            var iConfig         = Utilities.GetIConfigurationRoot();
            var logger          = Utilities.GetLogger(iConfig, _output);
            var wikiAccessLogic = new WikiAccessLogic();
            var sqlDataAccess   = new SqlDataAccess(iConfig);
            var retriever       = new TFWikiJobRetriever(iConfig, logger, wikiAccessLogic, sqlDataAccess);
            var definitions     = retriever.GetNewJobDefinitions().Result;

            Assert.NotNull(definitions);
        }
Пример #2
0
        public void RunJobRetrievalJobWithTFWikiRetriever()
        {
            var iConfig         = Utilities.GetIConfigurationRoot();
            var requestData     = Utilities.GetRequestData(null);
            var logger          = Utilities.GetLogger(iConfig, _output);
            var wikiAccessLogic = new WikiAccessLogic();
            var sqlDataAccess   = new SqlDataAccess(iConfig);
            var retriever       = new TFWikiJobRetriever(iConfig, logger, wikiAccessLogic, sqlDataAccess);
            var job             = new JobRetrievalJob(iConfig, logger, retriever, wikiAccessLogic, requestData);

            job.Execute();
        }
Пример #3
0
        public void RunJobRetrievalJobWithTextFileRetriever()
        {
            var iConfig         = Utilities.GetIConfigurationRoot();
            var requestData     = Utilities.GetRequestData(null);
            var wikiAccessLogic = new WikiAccessLogic();
            var textFileManager = new TextFileManager();
            var retriever       = new TextFileJobRetriever(iConfig, "WikiJobTest.txt", textFileManager);
            var logger          = Utilities.GetLogger(iConfig, _output);
            var job             = new JobRetrievalJob(iConfig, logger, retriever, wikiAccessLogic, requestData);

            job.Execute();
        }
Пример #4
0
        public void ExecuteLinkFixJobLinkTextNotRetainedIfNoCustomText()
        {
            var        iConfig         = Utilities.GetIConfigurationRoot();
            var        wikiAccessLogic = new WikiAccessLogic();
            var        log             = Utilities.GetLogger(iConfig, _output);
            var        jobData         = Utilities.GetRequestData(null);
            var        request         = Utilities.GetSampleLinkFixJobRequest();
            var        textFileManager = new TextFileManager();
            var        jobRetriever    = new TextFileJobRetriever(iConfig, "WikiJobTest.txt", textFileManager);
            LinkFixJob job             = (LinkFixJob)WikiJobFactory.GetWikiJob(request, log, wikiAccessLogic, iConfig, jobData, jobRetriever);

            job.Configuration = iConfig;
            job.Execute();
        }