Example #1
0
        public void Setup()

        {
            MockForms.Init();
            selectedCitySite = new CitySite()
            {
                CitySiteID             = 1,
                CitySiteAddress        = "Test Address 1",
                CitySiteCategoryID     = 1,
                CitySiteCost           = "10 EUR",
                CitySiteDescription    = "Test Description",
                CitySiteFavourite      = true,
                CitySiteImageURL       = "http://testurl/url1.jpg",
                CitySiteMapCoordinates = "100,100",
                CitySiteName           = "test site one",
                ChildDetail            = "test child detail",
                CitySiteSubtext        = "test subtext",
                CitySiteTelephone      = "123456789",
                CitySiteWebSite        = "testURL",
                DisabilityDetail       = "disability detail test",
                TransportID            = 2,
                NeighbourhoodID        = 1
            };



            Mock <INavigation> mockNav = new Mock <INavigation>();

            cityVM = new CitySiteViewModel(mockNav.Object, true);
            cityVM.SetDetails(selectedCitySite);
        }
        public CitySiteDetailView(int site)
        {
            InitializeComponent();


            CitySiteViewModel vm = new CitySiteViewModel(Navigation);

            vm.SetDetails(vm.getCityDetail(site, vm.repository));
            this.BindingContext = vm;

            setMap(vm.CitySiteMapCoordinates, vm.CitySiteName);
        }