예제 #1
0
        public void PrintCustomerBill()
        {
            int                      prod1 = 3434324;
            int                      prod2 = 5645434;
            MiniCalc                 mCalc = new MiniCalc();
            CommercialCalc           cCalc = new CommercialCalc();
            ScientificCalc           sCalc = new ScientificCalc();
            IArithematicOperations   calc  = new ScientificCalc();
            ITrigonametricOperations Tcalc = new ScientificCalc();
            //IWebDriver driver = new ChromeDriver();
            int bill = sCalc.Addition(prod1, prod2);

            Debug.WriteLine("Customer Bill :" + bill);
            //mCalc.DisplayMiniLogo();
            //cCalc.DisplayCommercialLogo();
            sCalc.DisplayScientificLogo();
            calc.Addition(prod1, prod2);
            Tcalc.CoSee();
        }
예제 #2
0
 public void Multiplication_of_2_and_2_returns_4()
 {
     Assert.AreEqual(4, MiniCalc.Multiply(2, 2));
 }
예제 #3
0
 public void Multiplication_of_2_by_2_equals_4()
 {
     Assert.IsTrue(MiniCalc.TestMyMain("2 2").Contains("2x2=4"));
 }
예제 #4
0
 [Test] //Under int.MinValue
 public void Multiplication_of_int_MIN_VALUE_and_2__Throws_OverflowException()
 {
     Assert.Throws <System.OverflowException>(() => MiniCalc.Multiply(int.MinValue, 2));
 }
예제 #5
0
 [Test] //Above int.MaxValue
 public void Multiplication_of_3_and_INT_MAX_VALUE_Throws_OverflowException()
 {
     Assert.Throws <System.OverflowException>(() => MiniCalc.Multiply(3, int.MaxValue));
 }
예제 #6
0
 [Test] //Under int.MinValue
 public void Multiplication_of_negative_3500000_and_7589_Throws_OverflowException()
 {
     Assert.Throws <System.OverflowException>(() => MiniCalc.Multiply(-3500000, 7589));
 }
예제 #7
0
 [Test] //Above int.MaxValue
 public void Multiplication_of_2_billion_and_23_Throws_System_Overflow_Exception()
 {
     Assert.Throws <System.OverflowException>(() => MiniCalc.Multiply(2000000000, 23));
 }
예제 #8
0
 public void Multiplication_of_0_and_MAX_INT_returns_0()
 {
     Assert.AreEqual(0, MiniCalc.Multiply(0, int.MaxValue));
 }
예제 #9
0
 public void Multiplication_of_negative_1_and_negative_50_returns_50()
 {
     Assert.AreEqual(50, MiniCalc.Multiply(-1, -50));
 }
예제 #10
0
 public void Multiplication_of_negative_4_and_755_returns_negative_3020()
 {
     Assert.AreEqual(-3020, MiniCalc.Multiply(-4, 755));
 }