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