Ejemplo n.º 1
0
        public async Task <IActionResult> Get(string baseCryptocurrencyCode)
        {
            var cryptocurrencyQuotesRequest = new CryptocurrencyQuotesRequest
            {
                CryptocurrencyCode = baseCryptocurrencyCode
            };

            var cryptocurrencyQuotesResponse =
                await _getCurrentQuotesForCryptocurrencyUseCase.Execute(cryptocurrencyQuotesRequest);

            return(Ok(cryptocurrencyQuotesResponse));
        }
Ejemplo n.º 2
0
        public void Forbids_use_of_an_absent_request()
        {
            Func <Task> executeGetCurrentQuotesForCryptocurrency = () => _useCase.Execute(null);

            executeGetCurrentQuotesForCryptocurrency.Should().ThrowExactly <ArgumentNullException>();
        }