Negate() public static method

Negates the supplied number.
/// If the supplied is not a supported numeric type. ///
public static Negate ( object number ) : object
number object The number to negate.
return object
Esempio n. 1
0
 public void Negate()
 {
     Assert.AreEqual(-10, NumberUtils.Negate(10));
 }
Esempio n. 2
0
 public void NegateString()
 {
     Assert.Throws <ArgumentException>(() => NumberUtils.Negate(string.Empty));
 }
Esempio n. 3
0
 public void NegateNull()
 {
     Assert.Throws <ArgumentException>(() => NumberUtils.Negate(null));
 }
Esempio n. 4
0
 public void NegateString()
 {
     NumberUtils.Negate(null);
 }
Esempio n. 5
0
 public void NegateNull()
 {
     NumberUtils.Negate(null);
 }
Esempio n. 6
0
 public void NegateString()
 {
     NumberUtils.Negate(string.Empty);
 }