public void History_ThreeItems_JumpInMiddle()
        {
            var app    = new StubbedApp();
            var verse1 = VerseHelper.Find("Luke", 3, 13).AbsoluteVerseNumber;
            var verse2 = VerseHelper.Find("Psalms", 23).AbsoluteVerseNumber;

            app.Recreate(verse1);
            app.StubHistoryControls.RaiseBackClick();
            app.Recreate(verse2);
            Assert.True(app.StubHistoryControls.BackEnabled);
            Assert.True(app.StubHistoryControls.ForwardEnabled);
            Assert.Equal(verse2, app.StubVerseView.CurrentAbsoluteVerseNumber);

            app.StubHistoryControls.RaiseBackClick();
            Assert.False(app.StubHistoryControls.BackEnabled);
            Assert.True(app.StubHistoryControls.ForwardEnabled);
            Assert.Equal(Bible.John_1_1, app.StubVerseView.CurrentAbsoluteVerseNumber);

            app.StubHistoryControls.RaiseForwardClick();
            Assert.True(app.StubHistoryControls.BackEnabled);
            Assert.True(app.StubHistoryControls.ForwardEnabled);
            Assert.Equal(verse2, app.StubVerseView.CurrentAbsoluteVerseNumber);

            app.StubHistoryControls.RaiseForwardClick();
            Assert.True(app.StubHistoryControls.BackEnabled);
            Assert.False(app.StubHistoryControls.ForwardEnabled);
            Assert.Equal(verse1, app.StubVerseView.CurrentAbsoluteVerseNumber);
        }
        public void History_JumpToNextLocation_DoesNotAddDuplicate()
        {
            var app    = new StubbedApp();
            var verse1 = VerseHelper.Find("Luke", 3, 13).AbsoluteVerseNumber;

            app.Recreate(verse1);
            app.StubHistoryControls.RaiseBackClick();
            app.Recreate(verse1);

            Assert.False(app.StubHistoryControls.ForwardEnabled);
            Assert.Equal(verse1, app.StubVerseView.CurrentAbsoluteVerseNumber);

            app.StubHistoryControls.RaiseBackClick();
            Assert.False(app.StubHistoryControls.BackEnabled);
            Assert.Equal(Bible.John_1_1, app.StubVerseView.CurrentAbsoluteVerseNumber);
        }
        public void History_JumpToSameLocation_DoesNotAddDuplicate()
        {
            var app = new StubbedApp();

            app.Recreate(Bible.John_1_1);

            Assert.False(app.StubHistoryControls.BackEnabled);
            Assert.False(app.StubHistoryControls.ForwardEnabled);
        }
        public void JumpToDifferentChapter_ChangesChapterHeading()
        {
            var app = new StubbedApp();
            var john1ChapterHeading = app.StubChapterHeading.Text;

            app.Recreate(VerseHelper.Find("John", 2).AbsoluteVerseNumber);
            Assert.Equal(VerseHelper.Find("John", 2).ChapterHeadingText, app.StubChapterHeading.Text);
            Assert.NotEqual(john1ChapterHeading, app.StubChapterHeading.Text);
        }
        public void JumpToSameChapter_DoesNotChangeChapterHeading()
        {
            var app = new StubbedApp();

            app.StubVerseView.RaiseOnScroll(VerseHelper.Find("John", 2).Chapter.EndVerse - 1);
            var john2ChapterHeading = app.StubChapterHeading.Text;

            app.Recreate(VerseHelper.Find("John", 2).AbsoluteVerseNumber);
            Assert.Equal(john2ChapterHeading, app.StubChapterHeading.Text);
        }
        public void Scrolling_UpdatesHistory()
        {
            var app    = new StubbedApp();
            var verse1 = Location.Create(Bible.John_1_1 + 13).AbsoluteVerseNumber;
            var verse2 = VerseHelper.Find("Psalms", 23).AbsoluteVerseNumber;

            app.StubVerseView.RaiseOnScroll(verse1);
            app.Recreate(verse2);
            app.StubHistoryControls.RaiseBackClick();
            Assert.Equal(verse1, app.StubVerseView.CurrentAbsoluteVerseNumber);

            app.StubHistoryControls.RaiseForwardClick();
            Assert.Equal(verse2, app.StubVerseView.CurrentAbsoluteVerseNumber);
        }