static void DumpDataSet(string dataset) { Console.WriteLine(string.Format("Dataset - {0}", dataset)); // getting list of parameters DMFX.BEA.Api.BEAApi.CallParams callParamsGetParameterList = new DMFX.BEA.Api.BEAApi.CallParams(); callParamsGetParameterList.Params.Add("datasetname", dataset); BEAResponse <BEAGetParameterList> respGetParameterList = _beaClient.GetParameterList(callParamsGetParameterList); // getting list of tables foreach (var item in respGetParameterList.BEAAPI.Results.Parameter) { _logger.Log(EErrorType.Info, string.Format("Param: {0}\tDesc: {1}\r\n\t\tData Type: {2}\r\n\t\tIs Required: {3}\r\n\tMultipleAccepted: {4}\r\n\t\tAll Value: {5}", item.ParameterName, item.ParameterDescription, item.ParameterDataType, item.ParameterIsRequiredFlag, item.MultipleAcceptedFlag, item.AllValue)); DMFX.BEA.Api.BEAApi.CallParams callParamsGetParameterValues = new DMFX.BEA.Api.BEAApi.CallParams(); callParamsGetParameterValues.Params.Add("datasetname", dataset); callParamsGetParameterValues.Params.Add("ParameterName", item.ParameterName); _logger.Log(EErrorType.Info, "\tValues:"); BEAResponse <BEAGetParameterValues> respGetParameterValues = _beaClient.GetParameterValues(callParamsGetParameterValues); foreach (var paramVal in respGetParameterValues.BEAAPI.Results.ParamValue) { _logger.Log(EErrorType.Info, string.Format("\t{0}: {1}", paramVal.Key, paramVal.Desc)); } } }
public void GetParameterValues_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"); callParams.Params.Add("ParameterName", "TableName"); BEAResponse <BEAGetParameterValues> response = api.GetParameterValues(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); }
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); } } } }