public void Should_Get_All_People_Without_Filter() { var output = _personAppService.GetPeople(new GetPeopleInput()); output.Items.Count.ShouldBe(UsingDbContext(context => context.People.Count())); output.Items.FirstOrDefault(p => p.Name == "halil").ShouldNotBe(null); }
public void Should_Get_All_People_Without_Any_Filter() { //Act var persons = _personAppService.GetPeople(new GetPeopleInput()); //Assert persons.Items.Count.ShouldBe(2); }
public ActionResult Index(GetPeopleInput input) { var output = _personAppService.GetPeople(input); var model = new IndexViewModel(output, input.Filter); return(View(model)); }
public ActionResult Index(GetPeopleInput input) { var output = _personAppService.GetPeople(input); var model = ObjectMapper.Map <IndexViewModel>(output); model.Filter = input.Filter; return(View(model)); }
public async Task <ActionResult> Index(GetPeopleInput input) { var output = _personAppService.GetPeople(input); var model = ObjectMapper.Map <IndexViewModel>(output); // dropdown var listaTipiContatto = Enum.GetValues(typeof(TipiContatto)).Cast <TipiContatto>().Select(v => new SelectListItem { Text = v.ToString(), Value = ((int)v).ToString() }).ToList(); model.Filter = input.Filter; model.TipiContatto = listaTipiContatto; return(View(model)); }