Пример #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Create minimal test data required for every test.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 protected override void CreateTestData()
 {
     base.CreateTestData();
     m_helper    = new DiscourseTestHelper(Cache);
     m_firstPara = m_helper.FirstPara;
     m_stText    = m_firstPara.Owner as IStText;
 }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create minimal test data required for every test.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_helper = new DiscourseTestHelper(Cache);
			m_firstPara = m_helper.FirstPara;
			m_stText = m_firstPara.Owner as IStText;
		}
Пример #3
0
		protected void CreateTestData()
		{
			using (new UndoRedoTaskHelper(Cache, "Undo LogicTest - CreateTestData", "Redo LogicTest - CreateTestData"))
			{
				m_helper = new DiscourseTestHelper(Cache);
				m_firstPara = m_helper.FirstPara;
				m_stText = m_firstPara.Owner as StText;
				m_firstParaWfics = m_helper.MakeAnnotations(m_firstPara);
				m_logic = new TestCCLogic(Cache, m_chart, m_stText.Hvo);
				m_helper.Logic = m_logic;
				m_logic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
				m_template = m_helper.MakeTemplate(out m_allColumns);
				// Note: do this AFTER creating the template, which may also create the DiscourseData object.
				m_chart = new DsConstChart();
				Cache.LangProject.DiscourseDataOA.ChartsOC.Add(m_chart);
				m_chart.TemplateRA = m_template;
				m_logic.Chart = m_chart;
				m_helper.Chart = m_chart;
			}
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create minimal test data required for every test.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_inMemoryCache.InitializeWritingSystemEncodings();
			m_inMemoryCache.InitializeLexDb();
			m_helper = new DiscourseTestHelper(Cache);
			m_firstPara = m_helper.FirstPara;
			m_stText = m_firstPara.Owner as StText;
			//// We want a real action handler so we can test Undo/Redo.
			//m_originalHandler = m_inMemoryCache.Cache.ActionHandlerAccessor;
			//((NewFdoCache)(m_inMemoryCache.Cache)).ActionHandler = ActionHandlerClass.Create();
			//// Make the key annotationdefns.
			ICmPossibilityList defns = Cache.LangProject.AnnotationDefsOA;
			if (defns == null)
			{
				defns = new CmPossibilityList();
				Cache.LangProject.AnnotationDefsOA = defns;
			}
			MakeAnnDefn(defns, LangProject.kguidAnnWordformInContext);
			MakeAnnDefn(defns, LangProject.kguidConstituentChartRow);
			MakeAnnDefn(defns, LangProject.kguidConstituentChartAnnotation);
		}
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Create minimal test data required for every test.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected override void CreateTestData()
        {
            base.CreateTestData();
            m_inMemoryCache.InitializeWritingSystemEncodings();
            m_inMemoryCache.InitializeLexDb();
            m_helper    = new DiscourseTestHelper(Cache);
            m_firstPara = m_helper.FirstPara;
            m_stText    = m_firstPara.Owner as StText;
            //// We want a real action handler so we can test Undo/Redo.
            //m_originalHandler = m_inMemoryCache.Cache.ActionHandlerAccessor;
            //((NewFdoCache)(m_inMemoryCache.Cache)).ActionHandler = ActionHandlerClass.Create();
            //// Make the key annotationdefns.
            ICmPossibilityList defns = Cache.LangProject.AnnotationDefsOA;

            if (defns == null)
            {
                defns = new CmPossibilityList();
                Cache.LangProject.AnnotationDefsOA = defns;
            }
            MakeAnnDefn(defns, LangProject.kguidAnnWordformInContext);
            MakeAnnDefn(defns, LangProject.kguidConstituentChartRow);
            MakeAnnDefn(defns, LangProject.kguidConstituentChartAnnotation);
        }
Пример #6
0
 public override void TestTearDown()
 {
     m_helper = null;
     base.TestTearDown();
 }
		public override void TestTearDown()
		{
			m_helper = null;
			base.TestTearDown();
		}