Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        /// ------------------------------------------------------------------------------------
        /// <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);
            });
        }
Пример #4
0
 public void CreateBogusWs()
 {
     int ws = ScrNoteImportManager.GetWsForLocale("x-unknown-ws");
 }