Ejemplo n.º 1
0
 private APIRequest(IAPIHandler handler)
 {
     url            = handler.GetUrlPath().Contains("http") ? handler.GetUrlPath() : handler.IsBulk() ? bulkurl + handler.GetUrlPath() : url + handler.GetUrlPath();
     requestMethod  = handler.GetRequestMethod();
     RequestHeaders = handler.GetRequestHeaders();
     RequestParams  = handler.GetRequestQueryParams();
     RequestBody    = handler.GetRequestBody();
 }
Ejemplo n.º 2
0
 public void StopDataTransfferAsyncTest()
 {
     try
     {
         appiHandler = new APIHandler();
         var t = appiHandler.StopDataTransfferAsync().Result;
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Ejemplo n.º 3
0
 public void GetCurveHeadersAsyncTest()
 {
     try
     {
         appiHandler = new APIHandler();
         var t = appiHandler.GetCurveHeadersAsync().Result;
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Ejemplo n.º 4
0
 public void InvokeDataTransfferAsyncTest()
 {
     try
     {
         string curves = "A,B,C";
         appiHandler = new APIHandler();
         appiHandler.GetCurveHeadersAsync();
         var t = appiHandler.InvokeDataTransfferAsync(curves).Result;
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Ejemplo n.º 5
0
 public void ExportXMLDataAsyncTest()
 {
     try
     {
         appiHandler = new APIHandler();
         CurvesData.LSTIndexInfo.Clear();
         CurvesData.LSTIndexInfo.Add(new CurveInfo()
         {
             Name = "A", MaxIndex = 123, MinIndex = 112
         });
         var t = appiHandler.ExportXMLDataAsync().Result;
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Ejemplo n.º 6
0
 public static APIRequest GetInstance(IAPIHandler handler)
 {
     return(new APIRequest(handler));
 }
Ejemplo n.º 7
0
 public ClientController(IAPIHandler objHandler, IDataSubscriber objSubscriber)
 {
     handler        = objHandler;
     dataSubscriber = objSubscriber;
 }