public void GetAllWagons() { EmptyLists(); wagonRepository = new WagonRepository(context); Assert.Equal(3, wagonRepository.GetAllWagons().Count); }
public IActionResult Index() { List <Wagon> wagons = repo.GetAllWagons(); WagonViewModel vm = new WagonViewModel { Wagons = new List <WagonDetailViewModel>() }; foreach (Wagon wagon in wagons) { vm.Wagons.Add(converter.WagonToViewModel(wagon)); } return(View(vm.Wagons)); }