public void EqualsIsImplemented() { AreaDensity v = AreaDensity.FromKilogramsPerSquareMeter(1); Assert.True(v.Equals(AreaDensity.FromKilogramsPerSquareMeter(1), AreaDensity.FromKilogramsPerSquareMeter(KilogramsPerSquareMeterTolerance))); Assert.False(v.Equals(AreaDensity.Zero, AreaDensity.FromKilogramsPerSquareMeter(KilogramsPerSquareMeterTolerance))); }
public void EqualsReturnsFalseOnNull() { AreaDensity kilogrampersquaremeter = AreaDensity.FromKilogramsPerSquareMeter(1); Assert.False(kilogrampersquaremeter.Equals(null)); }
public void EqualsReturnsFalseOnTypeMismatch() { AreaDensity kilogrampersquaremeter = AreaDensity.FromKilogramsPerSquareMeter(1); Assert.False(kilogrampersquaremeter.Equals(new object())); }