public void CompareToIsImplemented() { Torque newtonmeter = Torque.FromNewtonMeters(1); Assert.Equal(0, newtonmeter.CompareTo(newtonmeter)); Assert.True(newtonmeter.CompareTo(Torque.Zero) > 0); Assert.True(Torque.Zero.CompareTo(newtonmeter) < 0); }
public void CompareToIsImplemented() { Torque newtonmeter = Torque.FromNewtonMeters(1); Assert.AreEqual(0, newtonmeter.CompareTo(newtonmeter)); Assert.Greater(newtonmeter.CompareTo(Torque.Zero), 0); Assert.Less(Torque.Zero.CompareTo(newtonmeter), 0); }
public void CompareToThrowsOnNull() { Torque newtonmeter = Torque.FromNewtonMeters(1); // ReSharper disable once ReturnValueOfPureMethodIsNotUsed newtonmeter.CompareTo(null); }
public void CompareToThrowsOnTypeMismatch() { Torque newtonmeter = Torque.FromNewtonMeters(1); // ReSharper disable once ReturnValueOfPureMethodIsNotUsed newtonmeter.CompareTo(new object()); }
public void CompareToThrowsOnNull() { Torque newtonmeter = Torque.FromNewtonMeters(1); Assert.Throws <ArgumentNullException>(() => newtonmeter.CompareTo(null)); }
public void CompareToThrowsOnTypeMismatch() { Torque newtonmeter = Torque.FromNewtonMeters(1); Assert.Throws <ArgumentException>(() => newtonmeter.CompareTo(new object())); }