private IScrapedElement GetAuthor(HtmlDocument htmlDoc) { var authorHandler = new AuthorHandler(); return(authorHandler.Handle(htmlDoc, "Author")); }
public void Dado_um_comando_valido_deve_criar_a_tarefa() { _handler = new AuthorHandler(new FakeAuthorRepository(new DataContext(new DbContextOptions <DataContext>())), _mapper, _bus, _cache); _result = (GenericCommandResult)_handler.Handle(_validCommand); Assert.AreEqual(_result.Success, false); }
public GenericCommandResult Update([FromBody] UpdateAuthorCommand command, [FromServices] AuthorHandler handler) { _logger.LogInformation("Executing api/author to update author"); return((GenericCommandResult)handler.Handle(command)); }