コード例 #1
0
		public void AnnotationOfMisssingAlternative()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			Assert.IsFalse(MultiTextBase.GetAnnotationOfAlternativeIsStarred("zz"));
			Assert.IsFalse(MultiTextBase.ContainsAlternative("zz"), "should not cause the creation of the alt");
		}
コード例 #2
0
		public void ClearingAnnotationOfNonEmptyAlternative()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			MultiTextBase["zz"] = "hello";
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false);
			Assert.IsTrue(MultiTextBase.ContainsAlternative("zz"));
		}
コード例 #3
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"));
		}
コード例 #4
0
		public void ClearingAnnotationOfEmptyAlternativeRemovesTheAlternative()
		{
			MultiTextBase MultiTextBase = new MultiTextBase();
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true);
			MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false);
			Assert.IsFalse(MultiTextBase.ContainsAlternative("zz"));
		}