public void CompareToIsImplemented() { SpaceVelocity literpersecondcubicmeter = SpaceVelocity.FromLiterPerSecondCubicMeters(1); Assert.Equal(0, literpersecondcubicmeter.CompareTo(literpersecondcubicmeter)); Assert.True(literpersecondcubicmeter.CompareTo(SpaceVelocity.Zero) > 0); Assert.True(SpaceVelocity.Zero.CompareTo(literpersecondcubicmeter) < 0); }
public void CompareToThrowsOnNull() { SpaceVelocity literpersecondcubicmeter = SpaceVelocity.FromLiterPerSecondCubicMeters(1); Assert.Throws <ArgumentNullException>(() => literpersecondcubicmeter.CompareTo(null)); }
public void CompareToThrowsOnTypeMismatch() { SpaceVelocity literpersecondcubicmeter = SpaceVelocity.FromLiterPerSecondCubicMeters(1); Assert.Throws <ArgumentException>(() => literpersecondcubicmeter.CompareTo(new object())); }