Ejemplo n.º 1
0
		protected override void UndoReplaceSentenceWithSameSizeSentence(TextSelInfo tsiBeforeIns)
		{
			StTxtPara para0 = new StTxtPara(Cache, tsiBeforeIns.HvoAnchor);
			using (SegmentFreeFormAnnotationValidationHelper helper = new SegmentFreeFormAnnotationValidationHelper(para0))
			{
				base.UndoReplaceSentenceWithSameSizeSentence(tsiBeforeIns);
				helper.CaptureAndValidateSegmentsAfterSegBreakEdit(3);
				helper.ValidateSegFFCount(0, 3);
				helper.ValidateSegFFCount(1, 3);
				helper.ValidateSegFFCount(2, 3);
				helper.ValidateSegAndFFsWereDeleted(0);
				helper.ValidateMatchingFreeformAnnotations(1, 1);
				helper.ValidateMatchingFreeformAnnotations(2, 2);
			}
		}
Ejemplo n.º 2
0
		private static void ValidateReplaceSentenceWithSameSizeSentence(SegmentFreeFormAnnotationValidationHelper helper)
		{
			helper.CaptureAndValidateSegmentsAfterSegBreakEdit(3);
			helper.ValidateSegFFCount(0, 0);
			helper.ValidateSegFFCount(1, 3);
			helper.ValidateSegFFCount(2, 3);
			helper.ValidateSegAndFFsWereDeleted(0);
			helper.ValidateMatchingFreeformAnnotations(1, 1);
			helper.ValidateMatchingFreeformAnnotations(2, 2);
		}
Ejemplo n.º 3
0
		private static void ValidateReplaceSentencesWithSentence(SegmentFreeFormAnnotationValidationHelper helper)
		{
			helper.CaptureAndValidateSegmentsAfterSegBreakEdit(1);
			helper.ValidateSegFFCount(0, 0);
			// validate all previous segments and ffs were deleted
			helper.ValidateSegAndFFsWereDeleted(0);
			helper.ValidateSegAndFFsWereDeleted(1);
			helper.ValidateSegAndFFsWereDeleted(2);
		}
Ejemplo n.º 4
0
		protected override void UndoReplaceSentencesWithSentence(TextSelInfo tsiBeforeIns)
		{
			StTxtPara para0 = new StTxtPara(Cache, tsiBeforeIns.HvoAnchor);
			using (SegmentFreeFormAnnotationValidationHelper helper = new SegmentFreeFormAnnotationValidationHelper(para0))
			{
				base.UndoReplaceSentencesWithSentence(tsiBeforeIns);
				helper.CaptureAndValidateSegmentsAfterSegBreakEdit(3);
				helper.ValidateSegFFCount(0, 3);
				helper.ValidateSegFFCount(1, 3);
				helper.ValidateSegFFCount(2, 3);
				// validate all previous segments and ffs were deleted
				helper.ValidateSegAndFFsWereDeleted(0);
			}
		}
Ejemplo n.º 5
0
		public override void DeleteFirstTwoSentences()
		{
			using (SegmentFreeFormAnnotationValidationHelper helper = new SegmentFreeFormAnnotationValidationHelper(m_text1.ContentsOA.ParagraphsOS[0] as StTxtPara))
			{
				base.DeleteFirstTwoSentences();

				helper.CaptureAndValidateSegmentsAfterSegBreakEdit(1);
				helper.ValidateSegFFCount(0, 3);
				// validate the last sentence ff annotation was unaffected.
				helper.ValidateMatchingFreeformAnnotations(2, 0);
				// validate the ffs of the first two segments have been deleted.
				helper.ValidateSegAndFFsWereDeleted(0);
				helper.ValidateSegAndFFsWereDeleted(1);
			}
		}