public void Divide_WithIntegerParametersWithoutRemainder_ReturnsInteger() { var value = BuiltInOperators.Divide(4, 2); Assert.IsInstanceOfType(value, typeof(int)); }
public void Divide_WithIntegerParametersWithRemainder_ReturnsDouble() { var value = BuiltInOperators.Divide(4, 3); Assert.IsInstanceOfType(value, typeof(double)); }
public void Power_WithDouble2AndInteger3_ReturnsDouble8() { var actual = BuiltInOperators.Power(2.0, 3); Assert.AreEqual(8.0, actual); }
public void Power_WithDouble3AndInteger2_ReturnsDouble9() { var expected = BuiltInOperators.Power(3.0, 2); Assert.AreEqual(9.0, expected); }
public void Power_WithInteger3And2_ReturnsInteger9() { var actual = BuiltInOperators.Power(3, 2); Assert.AreEqual(9, actual); }
public void Power_WithDoubleZeroBaseIntegerNegativeExponent_ReturnsInfinity() { var value = (double)BuiltInOperators.Power(0.0, -1); Assert.IsTrue(double.IsInfinity(value)); }
public void Power_WithInteger2AndNegate3_ReturnsDouble0Dot125() { var actual = BuiltInOperators.Power(2, -3); Assert.AreEqual(0.125, actual); }
public void Power_WithInteger2And3_ReturnsInteger8() { var actual = BuiltInOperators.Power(2, 3); Assert.AreEqual(8, actual); }
public void Power_WithIntegerZeroBaseNegativeExponent_ThrowsDivideByZeroException() { var value = BuiltInOperators.Power(0, -1); }
public void Power_WithIntegerPositiveBaseNegativeExponent_ReturnsDouble() { var value = BuiltInOperators.Power(2, -3); Assert.IsInstanceOfType(value, typeof(double)); }
public void Power_WithIntegerPositiveBaseAndExponent_ReturnsInteger() { var value = BuiltInOperators.Power(2, 3); Assert.IsInstanceOfType(value, typeof(int)); }