public void BTN_CompareTwoObjectsThatBothRightAndLeftAreNull_ShouldReturnTrue() { var obj1 = new BTN(1, null, null); var obj2 = new BTN(1, null, null); Assert.True(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectWithDifferentType_ShouldReturnFalse() { var obj1 = new BTN(1, null, null); var obj2 = "Teste"; Assert.False(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectsThat1ObjectHasRightValueAnd2ObjectHasNullValueRight_ShouldReturnFalse() { var right = new BTN(1, null, null); var obj1 = new BTN(1, null, right); var obj2 = new BTN(1, null, null); Assert.False(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectsThat1ObjectHasLeftValueAnd2ObjectHasNullValueLeft_ShouldReturnFalse() { var left = new BTN(1, null, null); var obj1 = new BTN(1, left, null); var obj2 = new BTN(1, null, null); Assert.False(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectWithValueButLeftValueIsEqual_ShouldReturnTrue() { var left1 = new BTN(2, null, null); var left2 = new BTN(2, null, null); var obj1 = new BTN(1, left1, null); var obj2 = new BTN(1, left2, null); Assert.True(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectWithValueButRightValueIsDifferent_ShouldReturnFalse() { var right1 = new BTN(2, null, null); var right2 = new BTN(3, null, null); var obj1 = new BTN(1, null, right1); var obj2 = new BTN(1, null, right2); Assert.False(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectWithValueAndBothLeftAndRightValuesAreEqual_ShouldReturnTrue() { var left1 = new BTN(3, null, null); var left2 = new BTN(3, null, null); var right1 = new BTN(2, null, null); var right2 = new BTN(2, null, null); var obj1 = new BTN(1, left1, right1); var obj2 = new BTN(1, left2, right2); Assert.True(obj1.Equals(obj2)); }
public void BTN_CompareTwoObjectHaveManyLevelsEqual_ShouldReturnTrue() { var left1_3 = new BTN(20, null, null); var right2_3 = new BTN(20, null, null); var left1_1 = new BTN(10, left1_3, right2_3); var right2_2 = new BTN(10, left1_3, right2_3); var left1 = new BTN(3, left1_1, right2_2); var left2 = new BTN(3, left1_1, right2_2); var right1 = new BTN(2, left1_1, right2_2); var right2 = new BTN(2, left1_1, right2_2); var obj1 = new BTN(1, left1, right1); var obj2 = new BTN(1, left2, right2); Assert.True(obj1.Equals(obj2)); }
static void Main(string[] args) { BTN bTN2 = new BTN(); bTN2.Val = 4; //bTN.Left = bTN2; //bTN.Right = bTN3; BTN bTN3 = new BTN(); bTN3.Val = 6; object.Equals(bTN2, bTN3); //bool asd = object.Equals(bTN2, bTN3); BTN bTN = new BTN(); bTN.Val = 1; bTN.Left = bTN2; bTN.Right = bTN3; // BTN bTN22 = new BTN(); bTN22.Val = 4; //bTN22.Left = bTN; //bTN.Left = bTN2; //bTN.Right = bTN3; BTN bTN32 = new BTN(); bTN32.Val = 6; BTN bTN12 = new BTN(); bTN12.Val = 1; bTN12.Left = bTN22; bTN12.Right = bTN32; //// bool a = bTN.Equals(bTN12); }