예제 #1
0
        public void GetLastBatchRunDateTest()
        {
            DocumentService_Accessor target = new DocumentService_Accessor();
            DateTime expected = DateTime.Now;
            DateTime actual;

            actual = target.GetLastBatchRunDate(Constants.site);
            Assert.AreEqual(expected.ToShortDateString(), actual.ToShortDateString());
        }
예제 #2
0
        public void GetLastBatchRunTest()
        {
            DocumentService_Accessor target = new DocumentService_Accessor();
            Batch expected = new Batch();

            expected.batchId   = 1;
            expected.startDate = DateTime.Now;
            expected.site      = Constants.site;
            Batch actual;

            actual = target.GetLastBatchRun(Constants.site);
            Assert.AreEqual(expected.batchId, actual.batchId);
            Assert.AreEqual(expected.startDate.ToShortDateString(), actual.startDate.ToShortDateString());
            Assert.AreEqual(expected.site, actual.site);
        }
예제 #3
0
        public void GetDocumentsFromEktronTest()
        {
            DocumentService_Accessor target = new DocumentService_Accessor();
            string site = "commercial.owenscorning.com";
            DocumentProcessOptions processingOptions = new DocumentProcessOptions
            {
                Site      = site,
                StartDate = DateTime.Now.AddDays(-90).Date,
                EndDate   = DateTime.Now.AddDays(-1).Date,
                FileTypes = new List <string> {
                    "pdf", "doc"
                },
            };
            //List<UpdatedDoc> expected = null; // TODO: Initialize to an appropriate value
            List <UpdatedDoc> actual;

            actual = target.GetDocumentsFromEktron(processingOptions);
            Assert.IsNotNull(actual);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }