public void InitTest() { CheckDisposed(); m_cache.DatabaseAccessor.SetSavePoint(out m_sSavepoint); (m_settings as ScrImportSet).StartRef = m_titus; (m_settings as ScrImportSet).EndRef = m_titus; m_settings.ImportTranslation = true; m_settings.ImportBackTranslation = false; m_settings.ImportBookIntros = true; m_settings.ImportAnnotations = false; // pass null as the in memory cache since the acceptance tests should use the real cache. // FilteredScrBooks bookFilter = null; // m_importer = new DummyTeImporter(m_settings, m_cache, m_styleSheet, bookFilter); m_importer = new DummyTeImporter((m_settings as ScrImportSet), m_cache, m_styleSheet); m_importer.Initialize(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize the importer /// </summary> /// ------------------------------------------------------------------------------------ public override void TestSetup() { base.TestSetup(); m_styleSheet = new FwStyleSheet(); m_styleSheet.Init(Cache, m_scr.Hvo, ScriptureTags.kflidStyles); InitWsInfo(); DummyTeImporter.s_translatorNoteDefn = Cache.ServiceLocator.GetInstance<ICmAnnotationDefnRepository>().TranslatorAnnotationDefn; DummyTeImporter.s_consultantNoteDefn = Cache.ServiceLocator.GetInstance<ICmAnnotationDefnRepository>().ConsultantAnnotationDefn; m_titus = new BCVRef(56001001); m_settings = m_scr.FindOrCreateDefaultImportSettings(TypeOfImport.Other); m_settings.StartRef = m_titus; m_settings.EndRef = m_titus; m_settings.ImportTranslation = true; InitializeImportSettings(); m_actionHandler.EndUndoTask(); // Let the importer handle the undo/redo m_importer = new DummyTeImporter(m_settings, this, m_styleSheet); m_importer.Initialize(); m_importer.UndoInfo.StartImportingFiles(); }
public override void Initialize() { base.Initialize(); m_styleSheet = new FwStyleSheet(); m_styleSheet.Init(Cache, m_scr.Hvo, (int)Scripture.ScriptureTags.kflidStyles); InitWsInfo(); DummyTeImporter.s_translatorNoteDefn = m_scrInMemoryCache.m_translatorNoteDefn; DummyTeImporter.s_consultantNoteDefn = m_scrInMemoryCache.m_consultantNoteDefn; m_titus = new BCVRef(56001001); m_settings = new DummyScrImportSet(); m_scr.ImportSettingsOC.Add(m_settings); m_settings.ImportTypeEnum = TypeOfImport.Other; m_settings.StartRef = m_titus; m_settings.EndRef = m_titus; m_settings.ImportTranslation = true; InitializeImportSettings(); m_importer = new DummyTeImporter(m_settings, Cache, m_styleSheet, m_scrInMemoryCache); m_importer.Initialize(); }