Esempio n. 1
0
        public async Task Should_Get_All_Persons()
        {
            var output = await _personAppService.GetAll((new GetAllPersonInput()));

            output.Items.Count.ShouldBe(2);
            output.Items.Count(t => t.Name == "PP").ShouldBe(1);
        }
        public async Task <ActionResult> Index()
        {
            var people = await _personAppService.GetAll();

            var output = new PersonViewModel(people);

            return(View(output));
        }
Esempio n. 3
0
        public IActionResult GetPeople()
        {
            var people = _personAppService.GetAll();

            var results = Mapper.Map <IEnumerable <Models.Person> >(people);

            return(Ok(results));
        }
Esempio n. 4
0
        public async Task <ActionResult> Index(GetAllPersonInput input)
        {
            var output = await _personAppService.GetAll(input);

            var model = new IndexViewModel(output.Items);


            return(View(model));
        }
Esempio n. 5
0
        public void Should_Get_All_People_With_Success()
        {
            //Act
            var response = _personAppService.GetAll(new GetAllPeopleDto()
            {
                PageSize = 10
            });

            //Assert
            Assert.False(LocalNotification.HasNotification());
            response.Items.Count.ShouldBe(1);
        }
Esempio n. 6
0
        public async Task <IActionResult> PeopleList()
        {
            if (!HttpContext.User.Identity.IsAuthenticated)
            {
                return(View("../Home/Login"));
            }
            else
            {
                var output = await _personAppService.GetAll();

                return(View("PeopleList", output));
            }
        }
 public IActionResult Index()
 {
     return(Ok(_personAppService.GetAll()));
 }
Esempio n. 8
0
 public IActionResult GetAll()
 {
     return(Response(personAppService.GetAll()));
 }
Esempio n. 9
0
 public Task <IEnumerable <PersonViewModel> > Get()
 {
     return(_personAppService.GetAll());
 }
Esempio n. 10
0
        public async Task <IActionResult> Get()
        {
            var response = await _personAppService.GetAll();

            return(Ok(response));
        }
 public async Task <IActionResult> Index()
 {
     return(View(await _personAppService.GetAll()));
 }
Esempio n. 12
0
        public IActionResult Get([FromQuery] GetAllPeopleDto requestDto)
        {
            var response = _personAppService.GetAll(requestDto);

            return(CreateResponseOnGetAll(response, PERSON_NAME));
        }