public void EqualityInteger() { BInt testInt = new BInt(5); BInt testInt2 = new BInt(5); Assert.AreEqual(testInt, testInt2); Assert.IsTrue(testInt.Equals(testInt2.Value)); Assert.IsTrue(testInt.Equals(testInt)); }
public void EqualityNulls() { object testObjectNull = null; BInt testInt = new BInt(5); BInt testIntNull = null; Assert.IsFalse(testInt.Equals(testIntNull)); Assert.IsFalse(testInt.Equals(testObjectNull)); BString testString = new BString(""); BString testStringNull = null; string testStringNull2 = null; Assert.IsFalse(testString.Equals(testStringNull)); Assert.IsFalse(testString.Equals(testStringNull2)); Assert.IsFalse(testString.Equals(testObjectNull)); }