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"); }
public void ClearingAnnotationOfNonEmptyAlternative() { MultiTextBase MultiTextBase = new MultiTextBase(); MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true); MultiTextBase["zz"] = "hello"; MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false); Assert.IsTrue(MultiTextBase.ContainsAlternative("zz")); }
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")); }
public void ClearingAnnotationOfEmptyAlternativeRemovesTheAlternative() { MultiTextBase MultiTextBase = new MultiTextBase(); MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", true); MultiTextBase.SetAnnotationOfAlternativeIsStarred("zz", false); Assert.IsFalse(MultiTextBase.ContainsAlternative("zz")); }