public void EqualsIsImplemented() { VitaminA v = VitaminA.FromInternationalUnits(1); Assert.IsTrue(v.Equals(VitaminA.FromInternationalUnits(1))); Assert.IsFalse(v.Equals(VitaminA.Zero)); }
public void EqualsIsImplemented() { VitaminA v = VitaminA.FromInternationalUnits(1); Assert.True(v.Equals(VitaminA.FromInternationalUnits(1), VitaminA.FromInternationalUnits(InternationalUnitsTolerance))); Assert.False(v.Equals(VitaminA.Zero, VitaminA.FromInternationalUnits(InternationalUnitsTolerance))); }
public void EqualsReturnsFalseOnNull() { VitaminA internationalunit = VitaminA.FromInternationalUnits(1); Assert.IsFalse(internationalunit.Equals(null)); }
public void EqualsReturnsFalseOnTypeMismatch() { VitaminA internationalunit = VitaminA.FromInternationalUnits(1); Assert.IsFalse(internationalunit.Equals(new object())); }