public void TextEquals() { XCData c1 = new XCData("xxx"); XCData c2 = new XCData("xxx"); XCData c3 = new XCData("yyy"); Assert.False(c1.Equals(null)); Assert.False(c1.Equals("foo")); Assert.True(c1.Equals(c1)); Assert.False(c1.Equals(c2)); Assert.False(c1.Equals(c3)); }
/// <summary> /// Validates the behavior of the Equals overload on XText. /// </summary> /// <returns>true if pass, false if fail</returns> //[Variation(Desc = "TextEquals")] public void TextEquals() { XCData c1 = new XCData("xxx"); XCData c2 = new XCData("xxx"); XCData c3 = new XCData("yyy"); bool b1 = c1.Equals(null); bool b2 = c1.Equals("foo"); bool b3 = c1.Equals(c1); bool b4 = c1.Equals(c2); bool b5 = c1.Equals(c3); Validate.IsEqual(b1, false); Validate.IsEqual(b2, false); Validate.IsEqual(b3, true); Validate.IsEqual(b4, false); Validate.IsEqual(b5, false); }