예제 #1
0
        public void GetDataSetList_Success()
        {
            DMFX.BEA.Api.BEAApi api = new DMFX.BEA.Api.BEAApi();

            DMFX.BEA.Api.BEAApi.CallParams callParams = new BEA.Api.BEAApi.CallParams();

            BEAResponse <BEAGetDataSetList> response = api.GetDataSetList(callParams);

            Assert.IsTrue(response.BEAAPI != null);
            Assert.IsTrue(response.BEAAPI.Request != null);
            Assert.IsTrue(response.BEAAPI.Results != null);
            Assert.IsTrue(response.BEAAPI.Results.Error == null);
            Assert.IsTrue(response.BEAAPI.Request.RequestParam != null);
            Assert.IsTrue(response.BEAAPI.Request.RequestParam.Count > 0);
        }
예제 #2
0
        public void GetParameterList_Success()
        {
            DMFX.BEA.Api.BEAApi api = new DMFX.BEA.Api.BEAApi();

            DMFX.BEA.Api.BEAApi.CallParams callParams = new BEA.Api.BEAApi.CallParams();
            callParams.Params.Add("datasetname", "Regional");

            BEAResponse <BEAGetParameterList> response = api.GetParameterList(callParams);

            Assert.IsTrue(response.BEAAPI != null);
            Assert.IsTrue(response.BEAAPI.Request != null);
            Assert.IsTrue(response.BEAAPI.Results != null);
            Assert.IsTrue(response.BEAAPI.Results.Error == null);
            Assert.IsTrue(response.BEAAPI.Request.RequestParam != null);
            Assert.IsTrue(response.BEAAPI.Request.RequestParam.Count > 0);
        }
예제 #3
0
        public void GetParametersDetails_Success()
        {
            DMFX.BEA.Api.BEAApi api = new DMFX.BEA.Api.BEAApi();

            DMFX.BEA.Api.BEAApi.CallParams callParamsGetDataSetList = new BEA.Api.BEAApi.CallParams();

            BEAResponse <BEAGetDataSetList> respGetDataSetList = api.GetDataSetList(callParamsGetDataSetList);

            Dictionary <string, BEAParamValueItem> tables = new Dictionary <string, BEAParamValueItem>();

            foreach (var ds in respGetDataSetList.BEAAPI.Results.Dataset)
            {
                if (ds.DatasetName != "RegionalData")
                {
                    // getting list of parameters
                    DMFX.BEA.Api.BEAApi.CallParams callParamsGetParameterList = new BEA.Api.BEAApi.CallParams();
                    callParamsGetParameterList.Params.Add("datasetname", ds.DatasetName);

                    BEAResponse <BEAGetParameterList> respGetParameterList = api.GetParameterList(callParamsGetParameterList);

                    // getting list of tables
                    foreach (var item in respGetParameterList.BEAAPI.Results.Parameter)
                    {
                        DMFX.BEA.Api.BEAApi.CallParams callParamsGetParameterValues = new BEA.Api.BEAApi.CallParams();
                        callParamsGetParameterValues.Params.Add("datasetname", ds.DatasetName);
                        callParamsGetParameterValues.Params.Add("ParameterName", item.ParameterName);

                        BEAResponse <BEAGetParameterValues> response = api.GetParameterValues(callParamsGetParameterValues);

                        Assert.IsTrue(response.BEAAPI != null);
                        Assert.IsTrue(response.BEAAPI.Request != null);
                        Assert.IsTrue(response.BEAAPI.Results != null);
                        Assert.IsTrue(response.BEAAPI.Results.Error == null);
                        Assert.IsTrue(response.BEAAPI.Request.RequestParam != null);
                        Assert.IsTrue(response.BEAAPI.Request.RequestParam.Count > 0);
                    }
                }
            }
        }
예제 #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Reading...");
            DirectoryInfo dirInfo = Directory.CreateDirectory(ConfigurationManager.AppSettings["LogsFolder"]);

            _logger = new FileLogger();
            ILoggerParams loggerParams = _logger.CreateParams();



            loggerParams.Parameters["LogFolder"]    = ConfigurationManager.AppSettings["LogsFolder"];
            loggerParams.Parameters["NameTemplate"] = ConfigurationManager.AppSettings["LogFileNameTemplate"];

            _logger.Init(loggerParams);

            _beaClient = new DMFX.BEA.Api.BEAApi();

            DMFX.BEA.Api.BEAApi.CallParams callParams = new DMFX.BEA.Api.BEAApi.CallParams();

            BEAResponse <BEAGetDataSetList> respGetDataSetList = _beaClient.GetDataSetList(callParams);

            foreach (var ds in respGetDataSetList.BEAAPI.Results.Dataset)
            {
                if (ds.DatasetName != "RegionalData")
                {
                    _logger.Log(EErrorType.Info, string.Format("DATASET: {0}\tDesc: {1}", ds.DatasetName, ds.DatasetDescription));
                    DumpDataSet(ds.DatasetName);
                }
            }

            Console.WriteLine("Dumping...");

            System.Threading.Thread.Sleep(60000);

            Console.WriteLine("Done");
        }