public void UpdateGoToSubItems_DisabledWhenNoBooksInDB()
        {
            m_mainWnd.MockedBookFilter.Stub(bf => bf.BookCount).Return(0);

            Assert.IsTrue(m_mainWnd.UpdateGoToSubItems(m_dummyItemProps, true));

            Assert.IsFalse(m_dummyItemProps.Enabled,
                           "Go to subitem should be disabled when no books in DB.");
        }
示例#2
0
        public void UpdateGoToSubItems_DisabledWhenNoBooksInDB()
        {
            CheckDisposed();

            m_mainWnd.m_mockedBookFilter.SetupResult("BookCount", 0);

            Assert.IsTrue(m_mainWnd.UpdateGoToSubItems(m_dummyItemProps, true));

            Assert.IsFalse(m_dummyItemProps.Enabled,
                           "Go to subitem should be disabled when no books in DB.");
        }