Esempio n. 1
0
        public IEnumerable <Request> Gets()
        {
            SendRequestService _service = new SendRequestService(_unitOfWork);
            var requests = _service.ConsultAll();

            return(requests);
        }
Esempio n. 2
0
        public ActionResult <CreateArticleService> Post(SendRequestProperties request)
        {
            SendRequestService    _service = new SendRequestService(_unitOfWork);
            CreateRequestResponse response = _service.SendProductivity(request);

            return(Ok(response));
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void EnviarSolicitudSoftware()
        {
            CreateSoftwareService _softwareService = new CreateSoftwareService(new UnitOfWork(_context));
            var softwareRequest = new CreateSoftwareRequest {
                DocumentTeacher = "1035", Title = "Ciarp", NumberOfAuthors = 2, Credit = true, Headline = "Rafael", Impact = "yes"
            };

            _softwareService.Execute(softwareRequest);

            Software           article             = _softwareService.Consult(softwareRequest.Title);
            SendRequestService _sendRequestService = new SendRequestService(new UnitOfWork(_context));
            var propertiesRequest = new SendRequestProperties {
                TitleProductivity = "Ciarp"
            };
            var responseRequest = _sendRequestService.SendProductivity(propertiesRequest);

            Assert.AreEqual("La solicitud de la productividad Ciarp fue enviada con exito, su puntaje estimado es 15.", responseRequest.Menssage);
        }
Esempio n. 5
0
        public void EnviarSolicitudLibro()
        {
            CreateBookService _bookService = new CreateBookService(new UnitOfWork(_context));
            var bookRequest = new CreateBookRequest {
                DocumentTeacher = "1035", Title = "DDD", NumberOfAuthors = 2, Credit = true, BookType = "Libro de ensayo", Editorial = "Norma", Isbn = "asaa", Languaje = "Español", PublicationDate = DateTime.Now
            };

            _bookService.CreateBook(bookRequest);

            Book book = _bookService.Consult(bookRequest.Title);
            SendRequestService _sendRequestService = new SendRequestService(new UnitOfWork(_context));
            var propertiesRequest = new SendRequestProperties {
                TitleProductivity = "DDD"
            };
            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);
        }
Esempio n. 6
0
        public void EnviarSolicitudEvent()
        {
            CreateEventService _eventService = new CreateEventService(new UnitOfWork(_context));
            var eventRequest = new CreateEventRequest {
                DocumentTeacher = "1035", Title = "Ready Player One", NumberOfAuthors = 2, Credit = true, EventPlace = "", EventType = "Internacional", Isbn = "ssad", Issn = "asdfas", Languaje = "Español", Memories = "carlos", Name = "Mineria de datos en la actualidad", EventWeb = "www.con.com", EventDate = DateTime.Now
            };

            _eventService.Execute(eventRequest);

            Event events = _eventService.Consult(eventRequest.Isbn);

            SendRequestService _sendRequestService = new SendRequestService(new UnitOfWork(_context));
            var propertiesRequest = new SendRequestProperties {
                TitleProductivity = "Ready Player One"
            };
            var responseRequest = _sendRequestService.SendProductivity(propertiesRequest);

            Assert.AreEqual("La solicitud de la productividad Ready Player One fue enviada con exito, su puntaje estimado es 84.", responseRequest.Menssage);
        }