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