public void ClearFormatting() { var r = new MapNode(new MapTree(), "r"); var c1 = new MapNode(r, "C"); c1.Bold = true; c1.FontSize = 20; c1.BackColor = Color.Aqua; c1.Text = "ok"; c1.ClearFormatting(); Assert.IsFalse(c1.Bold); Assert.AreEqual(0, c1.FontSize); Assert.AreEqual(c1.BackColor, Color.Empty); }
public void ClearFormatting_NotClearText() { var r = new MapNode(new MapTree(), "r"); var c1 = new MapNode(r, "C"); c1.Bold = true; c1.FontSize = 20; c1.BackColor = Color.Aqua; c1.Text = "ok"; c1.ClearFormatting(); Assert.AreEqual(c1.Text, "ok"); }