Ejemplo n.º 1
0
 public void TestDivision()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Division(10, 10);
     Assert.AreEqual(1, result);
 }
Ejemplo n.º 2
0
 public void TestMultiply()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Multiply(10, 10);
     Assert.AreEqual(100, result);
 }
Ejemplo n.º 3
0
 public void TestAdd()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Add(10, 10);
     Assert.AreEqual(20, result);
 }
Ejemplo n.º 4
0
 public void TestSubstract()
 {
     MathsComponent obj = new MathsComponent();
     int result = obj.Substract(10, 10);
     Assert.AreEqual(0, result);
 }
Ejemplo n.º 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
 }