public void ClientTest() { IBar bar = BarMocks.UpMove(1, (double)100).ToList().First(); Felix.Models.BarCreationRequest request = new Felix.Models.BarCreationRequest("YMH18", bar); IFelixHttpClient client = new FelixHttpClient(); int barId = client.CreateBar(request).Result; Assert.IsTrue(barId > 0); }
public Persistence(bool IsAsync = false) { httpClient = new FelixHttpClient(); StartAPIRunning(); BarPersistence = new BarPersistence(httpClient); if (!IsAsync) { BarPersistence.Start(); } }
public async Task AddBarAsync(BarCreationRequest request) { IFelixHttpClient client = new FelixHttpClient(); try { int barId = await client.CreateBar(request); Debug.WriteLine($"barId: {barId}"); } catch (Exception e) { Debug.WriteLine($"Error: {e.Message}"); Debugger.Break(); } }