예제 #1
0
        public void SkipToNext_HasNoEffectWithSingleTracker()
        {
            var navigator = new Navigator(GetMockedTrackerFactory(), null);

            navigator.SkipToNext();
            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(0));
        }
예제 #2
0
        public void Navigator_InitializesWithSingleTracker()
        {
            var navigator = new Navigator(GetMockedTrackerFactory(), null);

            Assert.IsNotNull(navigator.CurrentTracker);
            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(0));
        }
예제 #3
0
        public void SkipToPrevious_UpdatesTrackerWhenNotFirst()
        {
            var navigator = new Navigator(GetMockedTrackerFactory(), null);

            navigator.Add(null);
            navigator.SkipToPrevious();

            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(0));
        }
예제 #4
0
        public void NavigateToNextTracker_UpdatesTrackerWhenNotLast()
        {
            var navigator = new Navigator(GetMockedTrackerFactory(), null);

            navigator.Add(null);
            navigator.SkipToPrevious();

            navigator.NavigateToNextTracker.Execute(null);
            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(1));
        }
예제 #5
0
        public void AddTracker_NavigatesToLastTracker()
        {
            var navigator = new Navigator(GetMockedTrackerFactory(), null);

            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(0));

            navigator.AddTracker.Execute(null);
            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(1));

            navigator.AddTracker.Execute(null);
            Assert.IsTrue(navigator.CurrentTracker == PossibleLocations.ElementAt(2));
        }