/* * Equals */ /// <summary> /// Determines whether the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>. /// </summary> /// <param name="obj">The <see cref="T:System.Object"></see> to compare with the current <see cref="T:System.Object"></see>.</param> /// <returns> /// true if the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>; otherwise, false. /// </returns> public override bool Equals(object obj) { NuGenPositiveInt32 compared = obj as NuGenPositiveInt32; if (compared != null) { return(compared.Value == this.Value); } return(false); }
public void PositiveInt32ToInt32CastTest() { NuGenPositiveInt32 positiveInt32 = new NuGenPositiveInt32(); positiveInt32.Value = 1; NuGenInt32 int32 = positiveInt32; Assert.AreEqual(1, int32.Value); }