public void Equals_Test2() { PDFFont one = new PDFFont("Sans-Serif", 12, FontStyle.Bold); PDFFont two = new PDFFont("Sans-Serif", 12, FontStyle.Bold); bool actual = one.Equals(two); Assert.IsTrue(actual); actual = two.Equals(one); Assert.IsTrue(actual); //Change font family two = new PDFFont("Times", 12, FontStyle.Bold); actual = one.Equals(two); Assert.IsFalse(actual); //Change size two = new PDFFont("Sans-Serif", 24, FontStyle.Bold); actual = one.Equals(two); Assert.IsFalse(actual); //Change style two = new PDFFont("Sans-Serif", 12, FontStyle.Bold | FontStyle.Italic); actual = one.Equals(two); Assert.IsFalse(actual); }
public void Equals_Test1() { PDFFont one = new PDFFont("Sans-Serif", 12, FontStyle.Bold); PDFFont two = new PDFFont("Sans-Serif", 12, FontStyle.Bold); object oneobj = one; object twoobj = two; bool actual = PDFFont.Equals(oneobj, twoobj); Assert.IsTrue(actual); two = new PDFFont("Sans-Serif", 14, FontStyle.Bold); oneobj = one; twoobj = two; actual = PDFFont.Equals(oneobj, twoobj); Assert.IsFalse(actual); }