コード例 #1
0
		public void MoveAnnotationToColBeforeMarkerWithNoRealCcas()
		{
			int[] allParaWfics = m_helper.MakeAnnotationsUsedN(1);
			CmIndirectAnnotation row0 = m_helper.MakeFirstRow();
			CmIndirectAnnotation cca0_4 = m_helper.MakeMovedTextAnnotation(4, null, row0, "<<<");

			int whereToInsert;
			ICmIndirectAnnotation existingCcaToAppendTo;
			ConstituentChartLogic.FindWhereToAddResult result =
				m_logic.FindWhereToAddWords(0, out whereToInsert, out existingCcaToAppendTo);
			Assert.AreEqual(ConstituentChartLogic.FindWhereToAddResult.kInsertCcaInSameRow, result);
			Assert.AreEqual(0, whereToInsert, "should insert at start of row");
			Assert.IsNull(existingCcaToAppendTo);
		}
コード例 #2
0
		public void MoveSecondAnnotationToEarlierColNewRow()
		{
			int[] allParaWfics = m_helper.MakeAnnotationsUsedN(1);
			CmIndirectAnnotation row0 = m_helper.MakeFirstRow();
			CmIndirectAnnotation cca0_1 = m_helper.MakeColumnAnnotation(1, new int[] { allParaWfics[0] }, row0);

			int whereToInsert;
			ICmIndirectAnnotation existingCcaToAppendTo;
			ConstituentChartLogic.FindWhereToAddResult result =
				m_logic.FindWhereToAddWords(0, out whereToInsert, out existingCcaToAppendTo);
			Assert.AreEqual(ConstituentChartLogic.FindWhereToAddResult.kMakeNewRow, result);
			Assert.AreEqual(0, whereToInsert, "should insert at start of new row");
			Assert.IsNull(existingCcaToAppendTo);
		}
コード例 #3
0
		public void MoveSecondAnnotationToSameRowLaterCol()
		{
			int[] allParaWfics = m_helper.MakeAnnotationsUsedN(1);
			CmIndirectAnnotation row0 = m_helper.MakeFirstRow();
			CmIndirectAnnotation cca0_1 = m_helper.MakeColumnAnnotation(1, new int[] { allParaWfics[0] }, row0);

			int whereToInsert;
			ICmIndirectAnnotation existingCcaToAppendTo;
			ConstituentChartLogic.FindWhereToAddResult result =
				m_logic.FindWhereToAddWords(3, out whereToInsert, out existingCcaToAppendTo);
			Assert.AreEqual(ConstituentChartLogic.FindWhereToAddResult.kInsertCcaInSameRow, result);
			Assert.AreEqual(1, whereToInsert, "should insert at end, after 1 existing annotation");
			Assert.IsNull(existingCcaToAppendTo);
		}
コード例 #4
0
		public void MoveAnnotationToColAfterLastMarker()
		{
			int[] allParaWfics = m_helper.MakeAnnotationsUsedN(1);
			CmIndirectAnnotation row0 = m_helper.MakeFirstRow();
			CmIndirectAnnotation cca0_1 = m_helper.MakeColumnAnnotation(1, new int[] { allParaWfics[0] }, row0);
			CmIndirectAnnotation cca0_4 = m_helper.MakeMovedTextAnnotation(4, cca0_1, row0, "<<<");

			int whereToInsert;
			ICmIndirectAnnotation existingCcaToAppendTo;
			ConstituentChartLogic.FindWhereToAddResult result =
				m_logic.FindWhereToAddWords(5, out whereToInsert, out existingCcaToAppendTo);
			Assert.AreEqual(ConstituentChartLogic.FindWhereToAddResult.kInsertCcaInSameRow, result);
			Assert.AreEqual(row0.AppliesToRS.Count, whereToInsert, "should insert at end of row");
			Assert.IsNull(existingCcaToAppendTo);
		}