Example #1
0
        public void OnSecondPageNavigation_OnlyRegistersWithDataTransferManagerOnce()
        {
            MockNavigationManager navigationManager = new MockNavigationManager();
            TestableSharingManager sharingManager = CreateSharingManager(navigationManager);

            navigationManager.RaiseNavigatedTo(new PageNavigationEventArgs(new MockNavigationEntry(), NavigationMode.Forward));
            navigationManager.RaiseNavigatedTo(new PageNavigationEventArgs(new MockNavigationEntry(), NavigationMode.Forward));

            Assert.AreEqual(1, sharingManager.RegisterForSharingCount);
        }
        public void OnFirstPageNavigation_RegistersWithDataTransferManager()
        {
            MockNavigationManager navigationManager = new MockNavigationManager();
            TestableSharingManager sharingManager = CreateSharingManager(navigationManager);

            navigationManager.RaiseNavigatedTo(new PageNavigationEventArgs(new PageInfo("Page 1", null), PageNavigationMode.Forward));

            Assert.Equal(1, sharingManager.RegisterForSharingCount);
        }