public void IntegerUtils_Add3Test() { int?int1 = null; int?int2 = new int?(1); int?result = IntegerUtils.Add(int1, int2); Assert.IsNotNull(result); Assert.AreEqual((byte)1, (byte)result); Assert.AreEqual((short)1, (short)result); Assert.AreEqual(1, result); Assert.AreEqual(1L, (long)result); Assert.AreEqual(1.0f, (float)result, 1.0f); Assert.AreEqual(1.0, (double)result, 1.0); Assert.AreEqual("1", result.ToString()); }
public void IntegerUtils_Add4Test() { int?int1 = new int?(1); int?int2 = new int?(1); int?int3 = new int?(1); int?result = IntegerUtils.Add(int1, int2, int3); Assert.IsNotNull(result); Assert.AreEqual((byte)3, (byte)result); Assert.AreEqual((short)3, (short)result); Assert.AreEqual(3, result); Assert.AreEqual(3L, (long)result); Assert.AreEqual(3.0f, (float)result, 1.0f); Assert.AreEqual(3.0, (double)result, 1.0); Assert.AreEqual("3", result.ToString()); }
public void IntegerUtils_Add6Test() { int?int1 = new int?(1); int?int2 = new int?(1); int?int3 = new int?(1); int?int4 = new int?(1); int?result = IntegerUtils.Add(int1, int2, int3, int4); Assert.IsNotNull(result); Assert.AreEqual((byte)4, (byte)result); Assert.AreEqual((short)4, (short)result); Assert.AreEqual(4, result); Assert.AreEqual(4L, (long)result); Assert.AreEqual(4.0f, (float)result, 1.0f); Assert.AreEqual(4.0, (double)result, 1.0); Assert.AreEqual("4", result.ToString()); }