Example #1
0
        private ExchangeBitBankAPI makeMockRequestMaker(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }
            return(new ExchangeBitBankAPI()
            {
                RequestMaker = requestMaker
            });
        }
        private async Task <ExchangeCoinbaseAPI> MakeMockRequestMaker(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }
            var api = (await ExchangeAPI.GetExchangeAPIAsync(ExchangeName.Coinbase) as ExchangeCoinbaseAPI) !;

            api.RequestMaker = requestMaker;
            return(api);
        }
Example #3
0
        private static ExchangePoloniexAPI CreatePoloniexAPI(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }
            var api = (ExchangeAPI.GetExchangeAPI(ExchangeName.Poloniex) as ExchangePoloniexAPI) !;

            api.RequestMaker = requestMaker;
            return(api);
        }
Example #4
0
        private ExchangeBitBankAPI MakeMockRequestMaker(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }
            var api = (ExchangeAPI.GetExchangeAPI(ExchangeName.BitBank) as ExchangeBitBankAPI) !;

            api.RequestMaker = requestMaker;
            return(api);
        }
        private static async Task <ExchangeBL3PAPI> CreateBL3PAPI(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }

            var api = (await ExchangeAPI.GetExchangeAPIAsync(ExchangeName.BL3P) as ExchangeBL3PAPI) !;

            api.RequestMaker = requestMaker;
            return(api);
        }
Example #6
0
        private static ExchangePoloniexAPI CreatePoloniexAPI(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }
            var polo = new ExchangePoloniexAPI {
                RequestMaker = requestMaker
            };

            return(polo);
        }
Example #7
0
        private static ExchangeBL3PAPI CreateBL3PAPI(string response = null)
        {
            var requestMaker = new MockAPIRequestMaker();

            if (response != null)
            {
                requestMaker.GlobalResponse = response;
            }

            var api = new ExchangeBL3PAPI
            {
                RequestMaker = requestMaker
            };

            return(api);
        }