예제 #1
0
        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);
        }
예제 #2
0
        public Persistence(bool IsAsync = false)
        {
            httpClient = new FelixHttpClient();

            StartAPIRunning();

            BarPersistence = new BarPersistence(httpClient);

            if (!IsAsync)
            {
                BarPersistence.Start();
            }
        }
예제 #3
0
        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();
            }
        }