public void BigDecimalUtils_Subtract3Test() { decimal?decimal1 = 1.0m; decimal?decimal2 = null; decimal?result = BigDecimalUtils.Subtract(decimal1, decimal2); Assert.AreEqual(null, result); }
public void BigDecimalUtils_Subtract1Test() { decimal?decimal1 = 1.0m; decimal?decimal2 = 1.0m; decimal?result = BigDecimalUtils.Subtract(decimal1, decimal2); Assert.IsNotNull(result); Assert.AreEqual(0, (int)result); Assert.AreEqual(0L, (long)result); Assert.AreEqual(0.0f, (float)result); Assert.AreEqual(0.0d, (double)result); Assert.AreEqual("0.0", BigDecimalUtils.ToString(result)); Assert.AreEqual((byte)0, (byte)result); Assert.AreEqual((short)0, (short)result); }