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