public void Test_Equals_Control_WhenOtherNull_ShouldReturnFalse() { //---------------Set up test pack------------------- var adapter = new WinFormsNumericUpDownAdapter(GenerateStub <NumericUpDown>()); NumericUpDown otherNumericUpDown = null; //---------------Assert Precondition---------------- Assert.IsNull(otherNumericUpDown); //---------------Execute Test ---------------------- var @equals = adapter.Equals(otherNumericUpDown); //---------------Test Result ----------------------- Assert.IsFalse(@equals); }
public void Test_Equals_Control_WhenNotSame_ShouldReturnTrue() { //---------------Set up test pack------------------- var adapter = new WinFormsNumericUpDownAdapter(GenerateStub <NumericUpDown>()); var otherNumericUpDown = GenerateStub <NumericUpDown>(); //---------------Assert Precondition---------------- Assert.AreNotSame(otherNumericUpDown, adapter.WrappedControl); //---------------Execute Test ---------------------- var @equals = adapter.Equals(otherNumericUpDown); //---------------Test Result ----------------------- Assert.IsFalse(@equals); }