public void Init() { m_inMemoryCache = ScrInMemoryFdoCache.Create(this); m_inMemoryCache.InitializeLangProject(); m_inMemoryCache.InitializeScripture(); m_inMemoryCache.AddBookToMockedScripture(1, "Genesis"); m_inMemoryCache.AddBookToMockedScripture(2, "Exodus"); m_inMemoryCache.AddBookToMockedScripture(5, "Deuteronomy"); m_James = m_inMemoryCache.AddBookToMockedScripture(59, "James"); m_inMemoryCache.AddBookToMockedScripture(66, "Revelation"); m_fdoCache = m_inMemoryCache.Cache; m_scr = (Scripture)m_fdoCache.LangProject.TranslatedScriptureOA; m_ctrlOwner = new Form(); ILgWritingSystemFactory wsf = m_fdoCache.LanguageWritingSystemFactoryAccessor; m_scp = new DummyScrPassageControl(null, m_scr, false); m_dbScp = new DummyScrPassageControl(null, m_scr, true); m_ctrlOwner.Controls.Add(m_scp); m_ctrlOwner.Controls.Add(m_dbScp); m_ctrlOwner.CreateControl(); if (m_scp.DropDownWindow != null) { m_scp.DropDownWindow.Close(); } if (m_dbScp.DropDownWindow != null) { m_dbScp.DropDownWindow.Close(); } // Forcing the reference to this should reset the ScrReference object for us // which, we hope will cause some strange errors to occur when running in // console mode. The tests seem to always work in gui mode but not console mode. m_scp.ScReference = new ScrReference(01001001, m_scr.Versification); m_dbScp.ScReference = new ScrReference(01001001, m_scr.Versification); }
public void Init() { m_inMemoryCache = ScrInMemoryFdoCache.Create(this); m_inMemoryCache.InitializeLangProject(); m_inMemoryCache.InitializeScripture(); m_inMemoryCache.AddBookToMockedScripture(1, "Genesis"); m_inMemoryCache.AddBookToMockedScripture(2, "Exodus"); m_inMemoryCache.AddBookToMockedScripture(5, "Deuteronomy"); m_James = m_inMemoryCache.AddBookToMockedScripture(59, "James"); m_inMemoryCache.AddBookToMockedScripture(66, "Revelation"); m_fdoCache = m_inMemoryCache.Cache; m_scr = (Scripture)m_fdoCache.LangProject.TranslatedScriptureOA; m_ctrlOwner = new Form(); ILgWritingSystemFactory wsf = m_fdoCache.LanguageWritingSystemFactoryAccessor; m_scp = new DummyScrPassageControl(null, m_scr, false); m_dbScp = new DummyScrPassageControl(null, m_scr, true); m_ctrlOwner.Controls.Add(m_scp); m_ctrlOwner.Controls.Add(m_dbScp); m_ctrlOwner.CreateControl(); if (m_scp.DropDownWindow != null) m_scp.DropDownWindow.Close(); if (m_dbScp.DropDownWindow != null) m_dbScp.DropDownWindow.Close(); // Forcing the reference to this should reset the ScrReference object for us // which, we hope will cause some strange errors to occur when running in // console mode. The tests seem to always work in gui mode but not console mode. m_scp.ScReference = new ScrReference(01001001, m_scr.Versification); m_dbScp.ScReference = new ScrReference(01001001, m_scr.Versification); }