Пример #1
0
		public override void Exit()
		{
			m_chart = null;
			m_mockRibbon = null;
			m_logic = null;

			base.Exit();
		}
		public override void Exit()
		{
			m_origCell = null;
			m_sentElem = null;
			m_chart = null;
			m_cclogic = null;

			base.Exit();
		}
Пример #3
0
        public override void Exit()
        {
            m_origCell = null;
            m_sentElem = null;
            m_chart    = null;
            m_cclogic  = null;

            base.Exit();
        }
Пример #4
0
 protected override void CreateTestData()
 {
     base.CreateTestData();
     m_logic        = new TestCCLogic(Cache, m_chart, m_stText);
     m_helper.Logic = m_logic;
     m_logic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
     m_helper.MakeTemplate(out m_allColumns);
     // Note: do this AFTER creating the template, which may also create the DiscourseData object.
     m_chart = m_helper.SetupAChart();
 }
		internal void MakeTextAndCcl()
		{
			using (new UndoRedoTaskHelper(Cache, "ConstituentChartDatabaseTests - MakeText()", "ConstituentChartDatabaseTests - MakeText()"))
			{
				m_text1 = Cache.LangProject.TextsOC.Add(new Text());
				m_text1.ContentsOA = new StText();
				m_ccl = new TestCCLogic(Cache, m_chart, m_text1.ContentsOAHvo);
				MakeTemplate();
			}
		}
Пример #6
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_logic = new TestCCLogic(Cache, m_chart, m_stText);
			m_helper.Logic = m_logic;
			m_logic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
			m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = m_helper.SetupAChart();
		}
Пример #7
0
		public override void Exit()
		{
			m_chart = null;
			m_template = null;
			m_allColumns = null;
			m_mockRibbon = null;
			m_logic = null;
			m_firstParaWfics = null;

			base.Exit();
		}
		protected override void CreateTestData()
		{
			base.CreateTestData();
			//m_firstParaOccurrences = m_helper.m_allOccurrences[m_firstPara];
			m_ccl = new TestCCLogic(Cache, m_chart, m_stText);
			m_helper.Logic = m_ccl;
			m_ccl.Ribbon = new MockRibbon(Cache, m_stText.Hvo);
			m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = m_helper.SetupAChart();
			m_helper.MakeDefaultChartMarkers();
			// Tests in this file want to limit text to known quantities, so delete the default paragraph.
			m_stText.ParagraphsOS.RemoveAt(0);
		}
Пример #9
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			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.MakeDefaultChartMarkers();
			m_helper.Chart = m_chart;
		}
Пример #10
0
        protected override void CreateTestData()
        {
            base.CreateTestData();
            m_logic        = new TestCCLogic(Cache, m_chart, m_stText);      // m_chart is still null!
            m_helper.Logic = m_logic;
            m_logic.Ribbon = new MockRibbon(Cache, m_stText.Hvo);
            m_helper.MakeTemplate(out m_allColumns);
            // Note: do this AFTER creating the template, which may also create the DiscourseData object.
            m_chart = m_helper.SetupAChart();

            m_constChart = new ConstituentChart(Cache, m_logic);
            m_constChart.Init(null, null, null);
            m_chartBody       = m_constChart.Body;
            m_chartBody.Cache = Cache;             // don't know why constructor doesn't do this, but it doesn't.

            m_chartBody.SetRoot(m_chart, m_allColumns.ToArray());
        }
Пример #11
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_logic = new TestCCLogic(Cache, m_chart, m_stText); // m_chart is still null!
			m_helper.Logic = m_logic;
			m_logic.Ribbon = new MockRibbon(Cache, m_stText.Hvo);
			m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = m_helper.SetupAChart();

			m_constChart = new ConstituentChart(Cache, m_logic);
			m_constChart.Init(null, null);
			m_chartBody = m_constChart.Body;
			m_chartBody.Cache = Cache; // don't know why constructor doesn't do this, but it doesn't.

			m_chartBody.SetRoot(m_chart, m_allColumns.ToArray());
		}
Пример #12
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;
			}
		}
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_cclogic = new TestCCLogic(Cache, m_chart, m_stText);
			m_cclogic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
			m_helper.Logic = m_cclogic;
			m_template = m_helper.MakeTemplate(out m_allColumns);
			// Note: do this AFTER creating the template, which may also create the DiscourseData object.
			m_chart = m_helper.SetupAChart();
			m_origCell = null;
			// Test must fill in the ClickedCell in the CChartSentenceElements object
			m_eligCols = m_allColumns.ToArray();
			// CChartSentenceElements always starts with all columns
			m_eligRows = null;
			// Test must fill in EligibleRows in the CChartSentenceElements object
			m_sentElem = new CChartSentenceElements(m_origCell, m_eligRows, m_eligCols);
			m_dlgLogicPrepose = new AdvancedMTDialogLogic(Cache, true, m_sentElem);
			m_dlgLogicPostpose = new AdvancedMTDialogLogic(Cache, false, m_sentElem);
			// create one each direction; test both
		}
Пример #14
0
 protected override void CreateTestData()
 {
     base.CreateTestData();
     m_cclogic        = new TestCCLogic(Cache, m_chart, m_stText);
     m_cclogic.Ribbon = m_mockRibbon = new MockRibbon(Cache, m_stText.Hvo);
     m_helper.Logic   = m_cclogic;
     m_template       = m_helper.MakeTemplate(out m_allColumns);
     // Note: do this AFTER creating the template, which may also create the DiscourseData object.
     m_chart    = m_helper.SetupAChart();
     m_origCell = null;
     // Test must fill in the ClickedCell in the CChartSentenceElements object
     m_eligCols = m_allColumns.ToArray();
     // CChartSentenceElements always starts with all columns
     m_eligRows = null;
     // Test must fill in EligibleRows in the CChartSentenceElements object
     m_sentElem         = new CChartSentenceElements(m_origCell, m_eligRows, m_eligCols);
     m_dlgLogicPrepose  = new AdvancedMTDialogLogic(Cache, true, m_sentElem);
     m_dlgLogicPostpose = new AdvancedMTDialogLogic(Cache, false, m_sentElem);
     // create one each direction; test both
 }
Пример #15
0
		protected override void CreateTestData()
		{
			base.CreateTestData();
			m_firstParaWfics = m_helper.MakeAnnotations(m_firstPara);
			m_logic = new TestCCLogic(Cache, m_chart, m_stText.Hvo); // m_chart is still null!
			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.MakeDefaultChartMarkers();
			m_helper.Chart = m_chart;

			m_constChart = new ConstituentChart(Cache, m_logic);
			m_constChart.Init(null, null);
			m_chartBody = m_constChart.Body;
			m_chartBody.Cache = Cache; // don't know why constructor doesn't do this, but it doesn't.
			m_chartBody.SetRoot(m_chart.Hvo, m_allColumns.ToArray());
		}
Пример #16
0
        protected override void CreateTestData()
        {
            base.CreateTestData();
            m_firstParaWfics = m_helper.MakeAnnotations(m_firstPara);
            m_logic          = new TestCCLogic(Cache, m_chart, m_stText.Hvo);    // m_chart is still null!
            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.MakeDefaultChartMarkers();
            m_helper.Chart = m_chart;

            m_constChart = new ConstituentChart(Cache, m_logic);
            m_constChart.Init(null, null);
            m_chartBody       = m_constChart.Body;
            m_chartBody.Cache = Cache;             // don't know why constructor doesn't do this, but it doesn't.
            m_chartBody.SetRoot(m_chart.Hvo, m_allColumns.ToArray());
        }