Esempio n. 1
0
 public void Test10()
 {
     //test getter/setter
     Numbers.Add numbers = new Numbers.Add(1);
     Assert.AreEqual(numbers.Carry, 1);
     numbers.Carry = 0;
     Assert.AreEqual(numbers.Carry, 0);
 }
Esempio n. 2
0
 public void Test9()
 {
     try {
         Numbers.Add numbers = new Numbers.Add();
         numbers.AddTwoLargeNumbers(null, null);
         Assert.Fail();
     }
     catch (Exception) {
     }
 }
Esempio n. 3
0
        public void Test11()
        {
            //test constructor
            Numbers.Add numbers = new Numbers.Add(1);
            Assert.AreEqual(numbers.Carry, 1);
            numbers.Carry = 0;
            Assert.AreEqual(numbers.Carry, 0);

            numbers = new Numbers.Add(0);
            Assert.AreEqual(numbers.Carry, 0);
            numbers.Carry = 1;
            Assert.AreEqual(numbers.Carry, 1);
        }
Esempio n. 4
0
 public void Test1()
 {
     Numbers.Add numbers = new Numbers.Add();
     Assert.AreEqual(numbers.AddTwoLargeNumbers("123", "321"), "444");
 }
Esempio n. 5
0
 public void Test8()
 {
     Numbers.Add numbers = new Numbers.Add();
     Assert.AreEqual(numbers.AddTwoLargeNumbers("9999999999999999999999999999999999999999", "9999999999999999999999999999999999999999"), "19999999999999999999999999999999999999998");
 }
Esempio n. 6
0
 public void Test6()
 {
     Numbers.Add numbers = new Numbers.Add();
     Assert.AreEqual(numbers.AddTwoLargeNumbers("1000000000000000000000000000000000000000", "1000000000000000000000000000000000000000"), "2000000000000000000000000000000000000000");
 }
Esempio n. 7
0
 public void Test2()
 {
     Numbers.Add numbers = new Numbers.Add();
     Assert.AreEqual(numbers.AddTwoLargeNumbers("1234", "321"), "1555");
 }
Esempio n. 8
0
 public void Test12()
 {
     //constructor
     Numbers.Add numbers = new Numbers.Add(5);
     Assert.AreEqual(numbers.Carry, 0);
 }