public ActionResult <CreateArticleService> Post(ArticleRequest request) { CreateArticleService _service = new CreateArticleService(_unitOfWork); CreateArticleResponse response = _service.Execute(request); return(Ok(response)); }
public void EnviarSolicitudArticulo() { CreateArticleService _articleService = new CreateArticleService(new UnitOfWork(_context)); var articleRequest = new ArticleRequest { DocumentTeacher = "1035", ArticleType = "Articulo Tradicional", Title = "Realidad Aumentada", NumberOfAuthors = 2, Credit = true, Issn = "1213s", JournalName = "Nature", JournalType = "A1", Language = "EspaƱol" }; _articleService.Execute(articleRequest); Article article = _articleService.Consult(articleRequest.Title); SendRequestService _sendRequestService = new SendRequestService(new UnitOfWork(_context)); var propertiesRequest = new SendRequestProperties { TitleProductivity = "Realidad Aumentada" }; var responseRequest = _sendRequestService.SendProductivity(propertiesRequest); Assert.AreEqual("La solicitud de la productividad Realidad Aumentada fue enviada con exito, su puntaje estimado es 15.", responseRequest.Menssage); }