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.

63 lines
1.8 KiB

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "showGeneralInfoEmployee.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test1_showGeneralInfoEmployee(void)
  11. {
  12. char employeeName[20] = "Atharva"; //Arrange
  13. char password[20] = "Atharvafdai7514";
  14. int ergebnis = checkUser(employeeName, password); //Act
  15. TEST_ASSERT_EQUAL_INT(1, ergebnis); //Assert
  16. }
  17. void test2_showGeneralInfoEmployee(void)
  18. {
  19. char employeeName[20] = "Can"; //Arrange
  20. char password[20] = "BlooMaskfdlt3817";
  21. int ergebnis = checkUser(employeeName, password); //Act
  22. TEST_ASSERT_EQUAL_INT(2, ergebnis); //Assert
  23. }
  24. void test3_showGeneralInfoEmployee(void)
  25. {
  26. char employeeName[20] = "Haytham"; //Arrange
  27. char password[20] = "TimoDLfdai7207";
  28. int ergebnis = checkUser(employeeName, password); //Act
  29. TEST_ASSERT_EQUAL_INT(3, ergebnis); //Assert
  30. }
  31. void test4_showGeneralInfoEmployee(void)
  32. {
  33. char employeeName[20] = "Julius"; //Arrange
  34. char password[20] = "Insertcatfdai7057";
  35. int ergebnis = checkUser(employeeName, password); //Act
  36. TEST_ASSERT_EQUAL_INT(4, ergebnis); //Assert
  37. }
  38. void test5_showGeneralInfoEmployee(void)
  39. {
  40. char employeeName[20] = "Mohamed"; //Arrange
  41. char password[20] = "MDfdai6618";
  42. int ergebnis = checkUser(employeeName, password); //Act
  43. TEST_ASSERT_EQUAL_INT(5, ergebnis); //Assert
  44. }
  45. void test6_showGeneralInfoEmployee(void)
  46. {
  47. char employeeName[20] = "Shivam"; //Arrange
  48. char password[20] = "Schivam007fdlt3781";
  49. int ergebnis = checkUser(employeeName, password); //Act
  50. TEST_ASSERT_EQUAL_INT(6, ergebnis); //Assert
  51. }
  52. #endif // TEST