public void BELIntegerAddNegativeTest()
 {
     BELInteger source = new BELInteger(4);
     int expectedResult = 2;
     int result = source.Add(-2);
     Assert.AreEqual(expectedResult, result, "Checking that BELInteger(4).Add(-2) = 2");
 }
 public void BELIntegerAddMinValueTest()
 {
     BELInteger source = new BELInteger(int.MinValue);
     int expectedResult = int.MinValue + 10;
     int result = source.Add(10);
     Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Add(10) works");
 }
 public void BELIntegerAddMinValueNegativeTest()
 {
     BELInteger source = new BELInteger(int.MinValue);
     int min = int.MinValue;
     int expectedResult = min - 10;
     int result = source.Add(-10);
     Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MinValue).Add(-10) 'wraps' correctly");
 }
 public void BELIntegerAddMaxValueTest()
 {
     BELInteger source = new BELInteger(int.MaxValue);
     int max = int.MaxValue;
     int expectedResult = max + 10;
     int result = source.Add(10);
     Assert.AreEqual(expectedResult, result, "Checking that BELInteger(int.MaxValue).Add(10) 'wraps' correctly");
 }
예제 #5
0
		public void BELIntegerStaticAddZeroResultTest()
		{
			BELInteger source = new BELInteger(-10);
			int expectedResult = 0;
			int result = source.Add(10);
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(-10).Add(10) = 0");
		}
예제 #6
0
		public void BELIntegerAddStringTest()
		{
			BELInteger source = new BELInteger(4);
			int expectedResult = 10;
			int result = source.Add("6");
			Assert.AreEqual(expectedResult, result, "Checking that BELInteger(4).Add(\"6\") = 10");
		}
예제 #7
0
		public void BELIntegerAddZeroTest()
		{
			BELInteger source = new BELInteger(4);
			int result = source.Add(0);
			Assert.AreEqual(source.Value, result, "Checking that BELInteger(4).Add(0) = 4");
		}