Пример #1
0
        public void Setup()

        {
            MockForms.Init();
            selectedCityShopping = new CityShopping()
            {
                CityShoppingID         = 1,
                CityShoppingAddress    = "Test Address 1",
                CityShoppingCategoryID = 1,
                BudgetID = 1,
                CityShoppingDescription    = "Test Description",
                CityShoppingFavourite      = true,
                CityShoppingImageURL       = "http://testurl/url1.jpg",
                CityShoppingMapCoordinates = "100,100",
                CityShoppingName           = "test shop one",
                ChildDetail           = "test child detail",
                CityShoppingSubtext   = "test subtext",
                CityShoppingTelephone = "123456789",
                CityShoppingWebSite   = "testURL",
                DisabilityDetail      = "disability detail test",
                TransportID           = 2,
                NeighbourhoodID       = 1
            };



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

            cityVM = new CityShopViewModel(mockNav.Object, true);
            cityVM.SetDetails(selectedCityShopping);
        }
Пример #2
0
        public CityShopDetailView(int shopid)
        {
            InitializeComponent();

            CityShopViewModel vm = new CityShopViewModel(Navigation);

            vm.SetDetails(vm.getSelectedShop(shopid, vm.repository));
            this.BindingContext = vm;
            setMap(vm.CityShopMapCoordinates, vm.CityShopName);
        }