public void Equals_Test() { PDFBoolean target = new PDFBoolean(true); object obj = new PDFBoolean(true); bool expected = true; bool actual; actual = target.Equals(obj); Assert.AreEqual(expected, actual, "PDFBooleans did not compare as equal"); obj = new PDFBoolean(false); expected = false; actual = target.Equals(obj); Assert.AreEqual(expected, actual, "PDFBooleans compared falsely as equal"); obj = new object(); expected = false; actual = target.Equals(obj); Assert.AreEqual(expected, actual, "PDFBoolean and Object compared falsely as equal"); }
public void Equals_Test1() { PDFBoolean one = new PDFBoolean(true); PDFBoolean two = new PDFBoolean(true); bool expected = true; bool actual; actual = PDFBoolean.Equals(one, two); Assert.AreEqual(expected, actual, "PDFBooleans did not compare as equal"); actual = Object.Equals(one, two); Assert.AreEqual(expected, actual, "PDFBooleans as objects did not compare as equal"); two = new PDFBoolean(false); expected = false; actual = PDFBoolean.Equals(one, two); Assert.AreEqual(expected, actual, "PDFBooleans compared falsely as equal"); actual = Object.Equals(one, two); Assert.AreEqual(expected, actual, "PDFBooleans as objects did not compare as equal"); }