public void FindOrCreateAnnotation_GuidNotFound() { StTxtParaBldr bldr = new StTxtParaBldr(Cache); ScrAnnotationInfo annInfo = new ScrAnnotationInfo(CmAnnotationDefnTags.kguidAnnConsultantNote, bldr, 0, 01001001, 01001002); IScrScriptureNote newNote = ScrNoteImportManager.FindOrCreateAnnotation(annInfo, Guid.NewGuid()); Assert.IsNotNull(newNote); Assert.IsNull(newNote.BeginObjectRA); Assert.IsNull(newNote.EndObjectRA); Assert.AreEqual(01001001, newNote.BeginRef); Assert.AreEqual(01001002, newNote.EndRef); }
public void Setup() { CheckDisposed(); base.Initialize(); m_scrInMemoryCache.InitializeWritingSystemEncodings(); m_scrInMemoryCache.InitializeAnnotationCategories(); m_scrInMemoryCache.InitializeAnnotationDefs(); m_scrInMemoryCache.SetupScriptureAnnotationCategories(); m_wsSpanish = InMemoryFdoCache.s_wsHvos.Es; // Initialize the annotation category possibility list. m_possList = XmlNoteCategoryTests.CreateCategories(m_scrInMemoryCache.Cache, m_possList, m_wsSpanish); ScrNoteImportManager.Initialize(m_scr, 1); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize this test fixture. /// </summary> /// ------------------------------------------------------------------------------------ public override void FixtureSetup() { base.FixtureSetup(); IWritingSystem wsEs; Cache.ServiceLocator.WritingSystemManager.GetOrSet("es", out wsEs); m_wsSpanish = wsEs.Handle; NonUndoableUnitOfWorkHelper.Do(Cache.ActionHandlerAccessor, () => { Cache.ServiceLocator.WritingSystems.AnalysisWritingSystems.Add(wsEs); // Initialize the annotation category possibility list. m_possList = XmlNoteCategoryTests.CreateCategories(Cache, m_wsSpanish); ScrNoteImportManager.Initialize(m_scr, 1); }); }
public void CreateBogusWs() { int ws = ScrNoteImportManager.GetWsForLocale("x-unknown-ws"); }