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