public void EqualsBooleanValueNode() { // arrange var a = new BooleanValueNode(false); var b = new BooleanValueNode(false); var c = new BooleanValueNode(true); // act bool ab_result = a.Equals(b); bool aa_result = a.Equals(a); bool ac_result = a.Equals(c); bool anull_result = a.Equals(default(BooleanValueNode)); // assert Assert.True(ab_result); Assert.True(aa_result); Assert.False(ac_result); Assert.False(anull_result); }
public void EqualsObject() { // arrange var a = new BooleanValueNode(false); var b = new BooleanValueNode(false); var c = new BooleanValueNode(true); var d = "foo"; var e = 1; // act bool ab_result = a.Equals((object)b); bool aa_result = a.Equals((object)a); bool ac_result = a.Equals((object)c); bool ad_result = a.Equals((object)d); bool ae_result = a.Equals((object)e); bool anull_result = a.Equals(default(object)); // assert Assert.True(ab_result); Assert.True(aa_result); Assert.False(ac_result); Assert.False(ad_result); Assert.False(ae_result); Assert.False(anull_result); }
public void EqualsIValueNode() { // arrange var a = new BooleanValueNode(false); var b = new BooleanValueNode(false); var c = new BooleanValueNode(true); var d = new StringValueNode("foo"); // act bool ab_result = a.Equals((IValueNode)b); bool aa_result = a.Equals((IValueNode)a); bool ac_result = a.Equals((IValueNode)c); bool ad_result = a.Equals((IValueNode)d); bool anull_result = a.Equals(default(IValueNode)); // assert Assert.True(ab_result); Assert.True(aa_result); Assert.False(ac_result); Assert.False(ad_result); Assert.False(anull_result); }