Beispiel #1
0
		public void BELIntegerMultiplyByOneTest()
		{
			BELInteger source = new BELInteger(8);
			int result = source.Multiply(1);
			Assert.AreEqual(source.Value, result, "Checking that BELInteger(8).Multiply(1) = 8");
		}
Beispiel #2
0
		public void BELIntegerStringMultiplyTest()
		{
			BELInteger source = new BELInteger(10);
			int expectedResult = 60;
			int result = source.Multiply("6");
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(10).Multiply(\"6\") = 60");
		}
Beispiel #3
0
		public void BELIntegerMultiplyMinValueNegativeTest()
		{
			BELInteger source = new BELInteger(int.MinValue);
			int min = int.MinValue;
			int expectedResult = min * -2;
			int result = source.Multiply(-2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Multiply(-2) 'wraps' correctly");
		}
Beispiel #4
0
		public void BELIntegerMultiplyMinValueTest()
		{
			BELInteger source = new BELInteger(int.MinValue);
			int min = int.MinValue;
			int expectedResult = min * 2;
			int result = source.Multiply(2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Multiply(2) works");
		}
Beispiel #5
0
		public void BELIntegerMultiplyZeroResultTest()
		{
			BELInteger source = new BELInteger(10);
			int expectedResult = 0;
			int result = source.Multiply(0);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(10).Multiply(0) = 0");
		}
Beispiel #6
0
		public void BELIntegerMultiplyNegativeSourceTest()
		{
			BELInteger source = new BELInteger(-4);
			int expectedResult = -8;
			int result = source.Multiply(2);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(-4).Multiply(2) = -8");
		}
Beispiel #7
0
		public void BELIntegerMultiplyZeroTest()
		{
			BELInteger source = new BELInteger(4);
			int result = source.Multiply(0);
			Assert.AreEqual(0, result, "Checking that BELInteger(4).Multiply(0) = 0");
		}