コード例 #1
0
ファイル: Program.cs プロジェクト: fcmai/AutomatedTesting
        //读函数
        private static Dictionary <string, UserFunctionDefinition> LoadFunctionsFromFiles()
        {
            var funFiles         = GetFunctionDefineFileNames();
            var funScripts       = funFiles.SelectMany(p => LoadFromFile(p)).ToList();
            var preprocessResult = TextPreProcesser.PreprocessV2(funScripts.ToList());
            var funs             = preprocessResult.Item3;
            var funcDefinitions  = FuncProcessor.Instance.GetFunctionDefines(funs);

            return(funcDefinitions);
        }
コード例 #2
0
        public void Test_ConvertFunc()
        {
            try
            {
                List <string> actualParam = new List <string>
                {
                    "测试发薪方案", "薪酬1", "月"
                };
                var scriptContent = LoadFromFile("../../脚本/函数1.txt");
                var tupleObj      = TextPreProcesser.PreprocessV2(scriptContent.ToList());

                FuncProcessor.Instance.Process(actualParam, tupleObj.Item3);
            }
            catch (Exception ex)
            {
                throw;
            }
        }