You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. package programmiermethoden_und_Werkzeuge;
  2. import static org.junit.Assert.*;
  3. import org.junit.Test;
  4. public class TaschenrechnerTest {
  5. @Test
  6. public void testAddition() {
  7. int a = 3;
  8. int b = 4;
  9. int ab = a + b;
  10. int result = Taschenrechner.addition(a,b);
  11. assertEquals(ab, result);
  12. }
  13. @Test
  14. public void testMultiplikation() {
  15. int a = 6;
  16. int b = 6;
  17. int ab = a * b;
  18. int result = Taschenrechner.multiplikation(a, b);
  19. assertEquals(ab, result);
  20. }
  21. @Test
  22. public void testDivision() {
  23. int a = 14;
  24. int b = 7;
  25. int ab = a / b;
  26. int result = Taschenrechner.division(a, b);
  27. assertEquals(ab, result);
  28. }
  29. @Test
  30. public void testPotenzieren() {
  31. int a = 2;
  32. int b = 3;
  33. int ab = (int)Math.pow(a, b);
  34. int result = Taschenrechner.potenzieren(a, b);
  35. assertEquals(ab, result);
  36. }
  37. @Test
  38. public void testKleinerAls() {
  39. int a = 9;
  40. int b = 6;
  41. boolean ab = a<b;
  42. boolean result = Taschenrechner.kleinerAls(a, b);
  43. assertEquals(ab, result);
  44. }
  45. @Test
  46. public void testGroeßerAls() {
  47. }
  48. @Test
  49. public void testGleich() {
  50. }
  51. @Test
  52. public void testRandomIntegerNummer() {
  53. }
  54. }