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)); }
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")); }
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 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")); }