예제 #1
0
		public void HasFormWithSameContent_OneEmpty_False()
		{
			MultiTextBase x = new MultiTextBase();
			MultiTextBase y = new MultiTextBase();
			y["ws"] = "test";
			y.SetAnnotationOfAlternativeIsStarred("ws", true);
			Assert.IsFalse(x.HasFormWithSameContent(y));
			Assert.IsFalse(y.HasFormWithSameContent(x));
		}
예제 #2
0
		public void EmptyingTextOfFlaggedAlternativeDoesNotDeleteIfFlagged()
		{
			// REVIEW: not clear really what behavior we want here, since user deletes via clearing text
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase["zz"] = "hello";
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			MultiTextBase["zz"] = "";
			Assert.IsTrue(MultiTextBase.ContainsAlternative("zz"));
		}
예제 #3
0
		public void ClearingAnnotationOfEmptyAlternativeRemovesTheAlternative()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false);
			Assert.IsFalse(MultiTextBase.ContainsAlternative("zz"));
		}
예제 #4
0
		public void ClearingAnnotationOfNonEmptyAlternative()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			MultiTextBase["zz"] = "hello";
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false);
			Assert.IsTrue(MultiTextBase.ContainsAlternative("zz"));
		}
예제 #5
0
		public void SetAnnotation()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			Assert.AreEqual(String.Empty, MultiTextBase.GetExactAlternative("zz"));
			Assert.IsTrue(MultiTextBase.GetAnnotationOfAlternativeIsStarred("zz"));
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false);
			Assert.IsFalse(MultiTextBase.GetAnnotationOfAlternativeIsStarred("zz"));
		}