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