public void ReturnsFalseWhenTheObjectIsNull() { var target = new Luid(0, 0); var result = target.Equals(null); Assert.False(result); }
public void ReturnsTrueWhenTheValuesAreEqualWhenTargetIsBoxed() { var target1 = new Luid(1, 1); object target2 = new Luid(1, 1); var result = target1.Equals(target2); Assert.True(result); }
public void EqualsTestWithBoxedLuidObject() { bool expected = true; Luid target = new Luid(1, 1); Luid other = new Luid(1, 1); bool actual = target.Equals((object)other); Assert.AreEqual(expected, actual); }
public void EqualsTestWithNullObject() { bool expected = false; Luid target = new Luid(1, 1); object obj = null; bool actual = target.Equals(obj); Assert.AreEqual(expected, actual); }
public void EqualsTest() { bool expected = false; Luid target = new Luid(1, 1); Luid other = new Luid(2, 2); bool actual = target.Equals(other); Assert.AreEqual(expected, actual); }
public void EqualsTestWithBoxedLuidObject() { var expected = true; var target = new Luid(1, 1); var other = new Luid(1, 1); var actual = target.Equals((object)other); Assert.AreEqual(expected, actual); }
public void EqualsTest() { var expected = false; var target = new Luid(1, 1); var other = new Luid(2, 2); var actual = target.Equals(other); Assert.AreEqual(expected, actual); }
/// <summary>Returns a value indicating whether this <see cref="ModeInfo"/> structure equals another structure of the same type.</summary> /// <param name="other">A <see cref="ModeInfo"/> structure.</param> /// <returns>Returns true if this <see cref="ModeInfo"/> structure equals the <paramref name="other"/> structure, otherwise returns false.</returns> public bool Equals(ModeInfo other) { if ((InfoType != other.InfoType) || (Id != other.Id) || !AdapterId.Equals(other.AdapterId)) { return(false); } if (InfoType == ModeInfoType.Source) { return(sourceMode.Equals(other.sourceMode)); } if (InfoType == ModeInfoType.Target) { return(targetMode.Equals(other.targetMode)); } return(true); }