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; } }
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; } }