public async Task <IActionResult> Calcular( [FromServices] CalculadoraJurosHandler handler, [SwaggerParameter(Required = true)][FromQuery] CalculoCommand command) { var result = await handler.Calcular(command); return(Ok(result)); }
public void Calcular_QuandoCommandForNull_DeveLancarExcecao() { handler.Calcular(null).Should(); handler.Invoking(x => x.Calcular(null)) .Should().ThrowExactly <ArgumentNullException>(); }