コード例 #1
0
        public async Task model_property_populated_by_action()
        {
            SetupFirstNavigationAndPage();

            const string item = "asj";
            await _coreMethods.PushPageModel <MockItemPageModel>(pm => pm.Item = item);

            _navigationMock.Received().PushPage(Arg.Any <Page>(), Arg.Is <MockItemPageModel>(o => o.Item == item), Arg.Any <bool>(), Arg.Any <bool>());
        }
コード例 #2
0
        public void navigation_servicename_is_passed_on()
        {
            SetupFirstNavigationAndPage ();

            var coreMethods = new PageModelCoreMethods (_page, _pageModel);
            coreMethods.PushPageModel<MockContentPageModel> ();

            _navigationMock.Received ().PushPage (Arg.Any<Page> (), 
                Arg.Is<FreshBasePageModel> (o => o.CurrentNavigationServiceName == _pageModel.CurrentNavigationServiceName), false, true);        
        }
コード例 #3
0
        public void navigationservice_should_be_resolved_via_name()
        {
            SetupFirstNavigationAndPage();

            var coreMethods = new PageModelCoreMethods(_page, _pageModel);

            coreMethods.PushPageModel <MockContentPageModel> ();
            coreMethods.PushPageModel <MockContentPageModel> ();

            _navigationMock.ReceivedCalls();
            _navigationMock.ClearReceivedCalls();

            coreMethods.PopPageModel();

            _navigationMock.ReceivedCalls();
            _navigationMock.ClearReceivedCalls();

            coreMethods.PopToRoot(false);
        }
コード例 #4
0
        public void navigation_servicename_is_passed_on()
        {
            SetupFirstNavigationAndPage();

            var coreMethods = new PageModelCoreMethods(_page, _pageModel);

            coreMethods.PushPageModel <MockContentPageModel> ();

            _navigationMock.Received().PushPage(Arg.Any <Page> (),
                                                Arg.Is <FreshBasePageModel> (o => o.CurrentNavigationServiceName == _pageModel.CurrentNavigationServiceName), false, true);
        }
コード例 #5
0
        void PushSecondNavigationStack()
        {
            _coreMethods = new PageModelCoreMethods(_page, _pageModel);
            _coreMethods.PushPageModel <MockContentPageModel> ();

            _pageSecond            = FreshPageModelResolver.ResolvePageModel <MockContentPageModel>();
            _pageModelSecond       = _pageSecond.BindingContext as MockContentPageModel;
            _coreMethodsSecondPage = new PageModelCoreMethods(_pageSecond, _pageModelSecond);
            _secondNavService      = new FreshNavigationContainer(_pageSecond, "secondNav");

            _coreMethods.PushNewNavigationServiceModal(_secondNavService, new FreshBasePageModel[] { _pageModelSecond });
        }
コード例 #6
0
        public void navigationservice_should_be_resolved_via_name()
        {
            SetupFirstNavigationAndPage ();

            var coreMethods = new PageModelCoreMethods (_page, _pageModel);
            coreMethods.PushPageModel<MockContentPageModel> ();
            coreMethods.PushPageModel<MockContentPageModel> ();

            _navigationMock.ReceivedCalls ();
            _navigationMock.ClearReceivedCalls ();

            coreMethods.PopPageModel ();

            _navigationMock.ReceivedCalls ();
            _navigationMock.ClearReceivedCalls ();

            coreMethods.PopToRoot (false);
        }
コード例 #7
0
        void PushSecondNavigationStack()
        {
            _coreMethods = new PageModelCoreMethods (_page, _pageModel);
            _coreMethods.PushPageModel<MockContentPageModel> ();

            _pageSecond = FreshPageModelResolver.ResolvePageModel<MockContentPageModel>();
            _pageModelSecond = _pageSecond.BindingContext as MockContentPageModel;   
            _coreMethodsSecondPage = new PageModelCoreMethods (_pageSecond, _pageModelSecond);
            _secondNavService = new FreshNavigationContainer (_pageSecond, "secondNav");

            _coreMethods.PushNewNavigationServiceModal (_secondNavService, new FreshBasePageModel[] { _pageModelSecond });
        }