Beispiel #1
0
        public void MergeFilesTest()
        {
            //DateTime date =  DateTime.Now.Date.AddDays(0 - (int)DateTime.Now.DayOfWeek);

            int weekOfYear = weekofyear(DateTime.Now);

            weekOfYear = weekofyear(DateTime.Parse("2009/12/31"));
            weekOfYear = weekofyear(DateTime.Parse("2010/01/01"));
            weekOfYear = weekofyear(DateTime.Parse("2010/12/31"));

            int    m = ExcelUtilies.ExcelColumnNameToIndex("AN");
            string c = ExcelUtilies.ExcelColumnIndexToName(m);

            //ExecelAdapter target = new ExecelAdapter(); // TODO: Initialize to an appropriate value
            //Dictionary<string, string> MergedFiles = new Dictionary<string,string>(); // TODO: Initialize to an appropriate value
            //MergedFiles.Add("China", @"C:\ReportExport\Etag_20110922_160228.xls");
            //MergedFiles.Add("Jan", @"C:\ReportExport\Etag_20110927_142140.xls");
            //MergedFiles.Add("USA", @"C:\ReportExport\Etag_20111009_163730.xls");
            //MergedFiles.Add("French", @"C:\ReportExport\Etag_20111011_140943.xls");

            //string outputFile = @"C:\ReportExport\MergedReport" + DateTime.Now.Second + ".xls"; // TODO: Initialize to an appropriate value
            //bool expected = true; // TODO: Initialize to an appropriate value
            //bool actual;
            //actual = target.MergeFiles(MergedFiles, outputFile);
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Beispiel #2
0
        public void ExcelColumnNameToIndexTest()
        {
            string name     = "AB"; // TODO: Initialize to an appropriate value
            int    expected = 28;   // TODO: Initialize to an appropriate value
            int    actual;

            actual = ExcelUtilies.ExcelColumnNameToIndex(name);
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Beispiel #3
0
        public void ExcelColumnIndexToNameTest()
        {
            DateTime date     = DateTime.Now.Date.AddDays(0 - DateTime.Now.Day);
            int      Index    = 28;   // TODO: Initialize to an appropriate value
            string   expected = "AB"; // TODO: Initialize to an appropriate value
            string   actual;

            actual = ExcelUtilies.ExcelColumnIndexToName(Index);
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }