public void Setup() { MockForms.Init(); selectedCityMuseum = new CityMuseum() { CityMuseumID = 1, CityMuseumAddress = "Test Address 1", CityMuseumCategoryID = 1, CityMuseumCost = "10 EUR", CityMuseumDescription = "Test Description", CityMuseumFavourite = true, CityMuseumImageURL = "http://testurl/url1.jpg", CityMuseumMapCoordinates = "100,100", CityMuseumName = "test museum one", ChildDetail = "test child detail", CityMuseumSubtext = "test subtext", CityMuseumTelephone = "123456789", CityMuseumWebSite = "testURL", DisabilityDetail = "disability detail test", TransportID = 2, NeighbourhoodID = 1 }; Mock <INavigation> mockNav = new Mock <INavigation>(); cityVM = new CityMuseumViewModel(mockNav.Object, true); cityVM.SetDetails(selectedCityMuseum); }
public CityMuseumDetailView(int museumID) { InitializeComponent(); CityMuseumViewModel vm = new CityMuseumViewModel(Navigation); vm.SetDetails(vm.getCityDetail(museumID, vm.repository)); this.BindingContext = vm; setMap(vm.CityMuseumMapCoordinates, vm.CityMuseumName); }