public void RejectMixedSign() { Assert.Throws <Exception>(() => DecimalEx.AGMean(-3, 6)); Assert.Throws <Exception>(() => DecimalEx.AGMean(3, -6)); }
public void TestSpecialCases(decimal x, decimal y, decimal expected, decimal tolerance) { tolerance = Helper.GetScaledTolerance(expected, (int)tolerance, true); Assert.That(DecimalEx.AGMean(x, y), Is.EqualTo(expected).Within(tolerance)); }