コード例 #1
0
        public static void ReadTemplate(DataSet dataSet, string testDataFileName)
        {
            var folderPath = ReflectionHelper.GetExecutingAssemblyFolder(Assembly.GetExecutingAssembly());

            var testDataFullFileName = Path.Combine(folderPath, testDataFileName);

            var shortcutTarget = TextFileIoHelper.GetShortcutTarget(testDataFullFileName);

            if (!File.Exists(shortcutTarget))
            {
                Assert.Inconclusive("The test data file {0} does not exist", shortcutTarget);
            }

            ExcelHelper.ReadTemplateIntoTable(dataSet, shortcutTarget, SupportedSheetNames, true);
        }
コード例 #2
0
        public static void ReadDictionary(DataSet dataSet, string testDataFileName)
        {
            const string accounts        = "ACCOUNTS";
            const string properties      = "PROPERTIES";
            const string contacts        = "CONTACTS";
            const string otherSecurities = "OTHER SECURITIES";

            var folderPath = ReflectionHelper.GetExecutingAssemblyFolder(Assembly.GetExecutingAssembly());

            var testDataFullFileName = Path.Combine(folderPath, testDataFileName);

            var shortcutTarget = TextFileIoHelper.GetShortcutTarget(testDataFullFileName);

            if (!File.Exists(shortcutTarget))
            {
                Assert.Inconclusive("The test data file {0} does not exist", shortcutTarget);
            }

            var supportedSheetNames = new List <string> {
                accounts, properties, contacts, otherSecurities
            };

            ExcelHelper.ReadDictionaryIntoTable(dataSet, shortcutTarget, supportedSheetNames);
        }