コード例 #1
0
        private async Task Consumir()
        {
            using (var httpTest = new HttpTest())
            {
                // arrange
                httpTest.RespondWith("OK", 200);
                // act
                var resposta = await _consumer.ConsumirApiAsync("deck/new/shuffle/", new FiltroDeck { deck_count = 1 });

                var deckId = resposta.deck_id;
            }
        }
コード例 #2
0
        private async Task Testar()
        {
            try
            {
                var consumidor = new ApiConsumer <FiltroDeck, Deck>();
                var resposta   = await consumidor.ConsumirApiAsync("deck/new/shuffle/", new FiltroDeck { deck_count = 1 });

                var deckId = resposta.deck_id;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }