Example #1
0
 public void TestDivision()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Division(10, 10);
     Assert.AreEqual(1, result);
 }
Example #2
0
 public void TestMultiply()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Multiply(10, 10);
     Assert.AreEqual(100, result);
 }
Example #3
0
 public void TestAdd()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Add(10, 10);
     Assert.AreEqual(20, result);
 }
Example #4
0
 public void TestSubstract()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Substract(10, 10);
     Assert.AreEqual(0, result);
 }
Example #5
0
 public void TestAdd() // publiczna klasa dodawania
 {
     MathsComponent obj = new MathsComponent(); // tworznie nowego obiektu
     int result = obj.Add(2, 2); //inicjowanie dwóch zmiennych liczbowych
     Assert.AreEqual(4, result); // wynik który ma wyjsc z testu
 }